Preparation before heading into the wilds

Discuss IB/IBx engine ideas, bugs, etc.
Post Reply
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Preparation before heading into the wilds

Post by cartons »

Hey, after a bit of lurking and tinkering, I just wanted to say 'hello' (and 'help').

I've only heard about your project a few days ago, but it has me very excited! Seeing how you've been at it for the last ten years or so, you probably don't need convincing, but IB has the potential to be an awesome tool that scratches a very specific gaming itch that I don't see being addressed anywhere else. Please carry on!

So - Sorry if this isn't an appropriate place to ask:
I have both IB Basic and IB2 v197. Ruleset customization is important to me, but I have no coding experience outside of some *very* rudimentary Python (not so helpful in this environment). This leads me to lean towards IBB as it appears somewhat more approachable for someone like me.

I noticed 'Raventhal', which I assume was built in IBB, has customized elements, but I can't figure out how to reverse engineer the code (having no starting point), or how to get the module to 'speak' with any new bits of code I stitch together.

I played around a bit with IB197, and...like...say I wanted to create a new spell; for example; the spell data in the editor for 'Web' points to a piece of code: "spWeb"; I would love to look at the code to see how that script actually works, but I can't find it in any of the folders. The data.json file (again IBB's Raventhal) seems to create a repository of new elements, but no actual working out of mechanics.

The IB Builders Guide doesn't offer any clues to attempt that sort of customization, and fishing through the folders, the only reference to the Web spell I could find is this:
{
"name": "Web",
"tag": "web",
"spellImage": "sp_web",
"description": "Fills a 3x3 square area with sticky spiderweds.",
"useableInSituation": "InCombat",
"spriteFilename": "fx_web",
"spriteEndingFilename": "fx_web3x3end",
"spellStartSound": "buffer",
"spellEndSound": "buffer",
"costSP": 15,
"spellTargetType": "PointLocation",
"spellEffectType": "DeBuff",
"aoeRadius": 1,
"range": 4,
"spellScript": "spWeb"
},
which isn't any different from what I find in the IB Toolset, and points once again to the spellScript "spWeb".

I understand there's necessarily a high barrier to entry for this sort of thing, and that you all have lives, and that in, in addition to building this engine, you don't have time to hand hold every stranger who wanders by, but it would be helpful if someone could point to how the scripts work together, and hopefully I might be able to learn what I can from example (or copypasting).

Thank you, in any case, for the passion you put into this project.
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Re: Preparation before heading into the wilds

Post by cartons »

I've found an old version of IB (v100), that does actually have all of these components accessible in the data > scripts folder. Is it possible to access these in later versions? They don't seem to be hidden in v197.
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Re: Preparation before heading into the wilds

Post by cartons »

Ah...I found 'IceBlinkEngine-master' on GitHub which answers my question.

Lots of exciting looking scripts in there! Could anyone tell me how to incorporate them into the ToolSet?
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Preparation before heading into the wilds

Post by slowdive »

Welcome to the IB forums! We are slow indeed, but we like it that way :lol:

The current trick with spells in IB v197 and IBbasic v28 is that there are two parts, the spell part and the effect part. The part you posted is the spell part. Below is an excerpt from the "data.json" file found here for IBbasic:

https://github.com/slowdive-fan/IBbasic ... /data.json

For IBbasic, this "data.json" file can be placed in the module's folder and any data will be appended to the default "data.json" file (see inside the "Raventhal" folder for an example if you have already downloaded that module). To completely override the default "data.json" file, create a folder called "override" at the root directory (same directory that has "modules" and "saves") and place your version of "data.json" in there.

Spell part found under ""dataSpellsList": [" part of the "data.json" file and it points to "spellEffectTag": "web",:

Code: Select all

{
      "name": "Web",
      "tag": "web",
      "spellImage": "sp_web",
      "description": "Fills a 3x3 square area with sticky spiderweds.",
      "useableInSituation": "InCombat",
      "spriteFilename": "fx_web",
      "spriteEndingFilename": "fx_web3x3end",
      "spellStartSound": "buffer",
      "spellEndSound": "buffer",
      "costSP": 14,
      "spellTargetType": "PointLocation",
      "isUsedForCombatSquareEffect": false,
      "spellEffectType": "DeBuff",
      "aoeShape": "Circle",
      "aoeRadius": 2,
      "range": 4,
      "spellScript": "none",
      "spellEffectTag": "web",
      "spellEffectTagList": [],
      "removeEffectTagList": []
    },
Effect part of the "data.json" file under ""dataEffectsList": ["

Code: Select all

{
      "name": "Web",
      "tag": "web",
      "tagOfSender": "senderTag",
      "classLevelOfSender": 0,
      "description": "Web Effect",
      "spriteFilename": "fx_webbed",
      "durationInUnits": 18,
      "currentDurationInUnits": 0,
      "startingTimeInUnits": 0,
      "babModifier": 0,
      "babModifierForRangedAttack": 0,
      "damageModifierForMeleeAttack": 0,
      "damageModifierForRangedAttack": 0,
      "acModifier": 0,
      "isStackableEffect": false,
      "isStackableDuration": false,
      "usedForUpdateStats": false,
      "effectScript": "efGeneric",
      "saveCheckType": "none",
      "saveCheckDC": 10,
      "doDamage": false,
      "damType": "",
      "damNumOfDice": 0,
      "damDie": 0,
      "damAdder": 0,
      "damAttacksEveryNLevels": 0,
      "damAttacksAfterLevelN": 0,
      "damAttacksUpToNLevelsTotal": 0,
      "damNumberOfAttacks": 0,
      "damNumberOfAttacksForEveryNLevels": 0,
      "damNumberOfAttacksAfterLevelN": 0,
      "damNumberOfAttacksUpToNAttacksTotal": 0,
      "doHeal": false,
      "healHP": true,
      "healType": "",
      "healNumOfDice": 0,
      "healDie": 0,
      "healAdder": 0,
      "healActionsEveryNLevels": 0,
      "healActionsAfterLevelN": 0,
      "healActionsUpToNLevelsTotal": 0,
      "doBuff": false,
      "doDeBuff": true,
      "statusType": "Immobile",
      "modifyFortitude": 0,
      "modifyWill": 0,
      "modifyReflex": 0,
      "modifyStr": 0,
      "modifyDex": 0,
      "modifyInt": 0,
      "modifyCha": 0,
      "modifyCon": 0,
      "modifyWis": 0,
      "modifyLuk": 0,
      "modifyMoveDistance": 0,
      "modifyHpMax": 0,
      "modifySpMax": 0,
      "modifySp": 0,
      "modifyHpInCombat": 0,
      "modifySpInCombat": 0,
      "modifyDamageTypeResistanceAcid": 0,
      "modifyDamageTypeResistanceCold": 0,
      "modifyDamageTypeResistanceNormal": 0,
      "modifyDamageTypeResistanceElectricity": 0,
      "modifyDamageTypeResistanceFire": 0,
      "modifyDamageTypeResistanceMagic": 0,
      "modifyDamageTypeResistancePoison": 0,
      "modifyNumberOfMeleeAttacks": 0,
      "modifyNumberOfRangedAttacks": 0,
      "modifyNumberOfEnemiesAttackedOnCleave": 0,
      "modifyNumberOfEnemiesAttackedOnSweepAttack": 0,
      "useDexterityForMeleeAttackModifierIfGreaterThanStrength": false,
      "useDexterityForMeleeDamageModifierIfGreaterThanStrength": false,
      "negateAttackPenaltyForAdjacentEnemyWithRangedAttack": false,
      "useEvasion": false,
      "modifyShopBuyBackPrice": 0,
      "modifyShopSellPrice": 0
    },
We broke it up like this because sometimes a spell can cast the effect "web", but also an item or an event trigger could call the "web" effect.

Hope this helps and if not, just keep asking more questions :lol:

One tip would be to maybe start with IB and not IBbasic because IB has a more detailed and flexible toolset plus it has more users that are familiar with the IB toolset to help explain things. As you already found, the IB toolset has a Spell Editor and an Effect Editor found under the "Wizards/Editors" menu of the toolset (much easier than messing with json files directly). Newer modules like Hearkenwold will use the "spellEffectTagList" collection to list one or more effects that are used by the spell (think combinations of effects for one spell) or they may use the older "spellEffectTag" which only calls one effect for that spell.
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Re: Preparation before heading into the wilds

Post by cartons »

Thank you for the response. The way Spells and Effects interact is beginning to make more sense to me :)

I'm slowly going through youngneil1's old primer https://www.iceblinkengine.com/forums/v ... f=38&t=289, but I'm wondering if I'm not using the ideal version of IB to follow along; many of the Triggers he mentions are not present, and the ones that are do not show up in the right hand bar when clicked on.

ex:
The INFO button is selected. I left-click the 'jaden' sprite, but instead of showing me the 'jaden_108' trigger (which I know is there because right-click verifies), the TriggerEvents tab stays on newTrigger109, the last trigger created, and I can't get it to switch to any previously made triggers.

I'm using BBeta197. Is there a previous, hallmarked version of IB I should be using?
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Preparation before heading into the wilds

Post by slowdive »

I just tried opening toolset (v196) and created a new trigger on the homeds map. I then right clicked on the jaden prop and two context menu options show up. I then can click on the trigger tag and that switched from the new trigger to the jaden trigger in the trigger panel. If it doesn't seem to be working for you then there may have been a bug created in v197 (I don't have v197 readily available).

That quick start guide is very outdated. I think the "IB Builders Guide_v2.docx" is a more recent, but still old. It can be found in the root folder, the same folder that has the IceBlink2.exe and IBBToolset.exe.

Also, I did make some video tutorials for IBbasic that may be helpful, but are not directly the same as IB.
https://www.youtube.com/playlist?list=P ... 5iR63N8e26
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Re: Preparation before heading into the wilds

Post by cartons »

Thanks for the leads, I've gone through those videos, and they are informative.

I've downloaded Hearkenwold and will (after enjoying it) take it apart to get a sense of how to do the possible.
User avatar
Dorateen
Posts: 326
Joined: Thu Jan 16, 2020 3:03 pm

Re: Preparation before heading into the wilds

Post by Dorateen »

Just a mention on triggers and trigger properties. I have also noticed that sometimes clicking the info button and selecting a trigger, the information does not immediately show up. Clicking back on the screen, and then re-selecting the trigger seems to bring it up. Could be a display glitch, but it does not seem to prevent triggers from functioning.
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Preparation before heading into the wilds

Post by slowdive »

Hearkenwold for IB (not IBbasic) will definitely be a good resource as well as being an amazing module.
zach_holbrook
Posts: 94
Joined: Thu Jan 16, 2020 5:00 am

Re: Preparation before heading into the wilds

Post by zach_holbrook »

Hey there! I'm late to this thread, but I'd be happy to help answer any of your questions too. Welcome!
youngneil1
Posts: 148
Joined: Mon Jan 20, 2020 9:01 am

Re: Preparation before heading into the wilds

Post by youngneil1 »

I am even later :oops: , - a hearty welcome, cartons!

I am a bit out of the IB loop these days (see current Unreal Enigne project), but return I will :) . This work is not done yet, harf!
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Re: Preparation before heading into the wilds

Post by cartons »

Hey youngneil1, no worries, I find it cool how you guys have been steadily chipping away at this block for the last 8+ years. I've been lowkey evangelizing this project here and there, anticipating the day when this becomes a cornerstone item in every rpg enthusiast's toolkit.

The fantasy I'd like to indulge here would be to somehow marry the two formative rpgs of my childhood; Pokemon and Baldur's Gate (it's a jellybean pizza, I know), which, off the bat would require a system that allows for recruitable pre-made pcs that you can boot from your party at will (with the exception of the human custom pc), but recruit at a later a time if you choose; as well as a system that allows for pcs to 'evolve', essentially ascending to a higher class of specialization.

I have no idea if the first is possible, while with the second, I see only aesthetic obstacles; like, is it possible for a pc to have its profile and overworld sprite changed?

I'd like to be able to steal as much knowledge as I can from taking apart existing modules, and digging through the archived boards, but to supplement the work, is there, like, a database of non-integrated scripts on github or somewhere that I could look at?
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Preparation before heading into the wilds

Post by slowdive »

All of the ideas you mentioned are possible in the existing system. Recruitable PCs that can be removed via a conversation, changing PC sprites, special builder made custom traits that essentially can make a specialization class. Some of these are in use in modules like Hearkenwold, Raventhal, Lanterna - The Exile, and Lanterna - Return to Charn. I don't think there are any script resource databases out there.
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Re: Preparation before heading into the wilds

Post by cartons »

I have a couple of questions:

I'm having trouble with the gaAddPartyMember.cs script. I set it up in a conversation, with the parameter pointing to the Char.json file (in the data folder), but I can't get it to follow through. MaxPartySize is set to 6 and I'm not seeing any other obstacle to script activation.

I've checked the 'Fresh Template' that comes included, and it looks like the test Companion Balen doesn't join your party either (also uses the same gaAddPartyMember.cs script.

My next question is about accessing some of the parameters that don't show up in the builder like the elements list (ie. Acid, Ice, etc..) as well as the Item scripts (ie. itHealLight.cs). Is there a way, for example, to get a Potion to heal 7 HP instead of 8, besides resorting to creating a new Spell Effect to trigger on the Item's use?

btw, I'm using the IceBlink 2 RPG Toolset ver 1.00, which I understand is still in development.
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Preparation before heading into the wilds

Post by slowdive »

I'm not exactly sure about the gaAddPartyMember.cs script, why it isn't working right. I know that you can add party members and even temporary party members. It may come down to a syntax issue with the file name or location of the file? Have you tried turning debugmode on and see what notes show up in the message box? Also, maybe check the "IB2ErrorLog.txt" to see if any messages maybe show up there that may be related. We have slowly been working on adding more debugging messages and creating more intuitive functionality, but we still have a long way to go with that. Unfortunately, IB can still have a large learning curve because of the lack of up-to-date documentation.

We have been moving away from fixed item scripts like "itHealLight.cs" and such. We created the effect system so that the builders can have a lot of flexibility in creating what they need. We add new features to the Effect Class as needed as well. So to have a healing option that does 1-7 or just 7, you create an Effect in the Effect editor and then use that effect with an item or spell or trait.
zach_holbrook
Posts: 94
Joined: Thu Jan 16, 2020 5:00 am

Re: Preparation before heading into the wilds

Post by zach_holbrook »

cartons wrote: Sat Feb 20, 2021 2:06 am

I'm having trouble with the gaAddPartyMember.cs script. I set it up in a conversation, with the parameter pointing to the Char.json file (in the data folder), but I can't get it to follow through. MaxPartySize is set to 6 and I'm not seeing any other obstacle to script activation.
Have you made sure to enter the name without the .json file extension?
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Re: Preparation before heading into the wilds

Post by cartons »

Ah, thank you,
It may come down to a syntax issue with the file name or location of the file?
Have you made sure to enter the name without the .json file extension?
That was the issue. I was typing in the .json extension in the Parameter 1 case. Could it be the example given in the IB build I'm using is misleading?

//gaAddPartyMember.cs - Adds a pre-made character to the party
//parm1 = (string) PC file name (ex. Drin.json)
//parm2 = none
//parm3 = none
//parm4 = none
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Preparation before heading into the wilds

Post by slowdive »

I think the example may be based on an older version maybe. In IBbasic, I check for both with and without the extension, but IB doesn't have the check (we should add it):

IBbasic:

Code: Select all

        public void AddCharacterToParty(string filename)
        {
            try
            {
                //if the filename doesn't have a .json extension, add it
                if (!filename.EndsWith(".json"))
                {
                    filename += ".json";
                }
                Player newPc = gv.cc.LoadPlayer(filename); //ex: filename = "ezzbel.json"
                ...
IB:

Code: Select all

       public void AddCharacterToParty(string filename)
        {
            try
            {
                Player newPc = gv.cc.LoadPlayer(filename +".json"); //ex: filename = "ezzbel.json"
                ...
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Re: Preparation before heading into the wilds

Post by cartons »

I went to test some recent changes to my game, and when I select 'New Game' and try to hit the left and right arrows to scroll to my test character, I get hit with this error message:

System.NullReferenceException: Object reference not set to an instance of an object.
at IceBlink2.ScreenPartyBuild.redrawPartyBuild()
at IceBlink2.GameView.Render(Single elapsed)
at IceBlink2.GameView.gameTimer_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I'm not sure what object instance is being referred to here as not prperly set. The Data Check within the Toolset doesn't provide any information.

Anyone have a clue?

edit: This happens even if I delete all the created characters from the save folder. I'm able to create new characters, just not select them with the left and right buttons.
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Re: Preparation before heading into the wilds

Post by cartons »

I worked around it by going back to previously saved version of the module. I was able to import all the area, trigger, and conversation work I'd done since then, so there wasn't anything there that had caused the problem. Strange.
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Preparation before heading into the wilds

Post by slowdive »

Did you make any changes to any of the default Player Class, Race, Traits, Spells, or Effects? I'm guessing that one of the characters being loaded has a conflict with some data. If you can post a link to the bad module folder (like dropbox or something), I could try running it inside of Visual Studio to see where exactly it has the issue.
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Re: Preparation before heading into the wilds

Post by cartons »

I ran some tests and that was indeed the problem. I had changed the name and tag of one of the Races. I thought I'd also changed the tags in all the Player files correspondingly, but either it didn't make a difference, or I forgot something somewhere.

Thank you for willing to take a look at it, though :)

Hopefully I'll have something to share shortly!
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Re: Preparation before heading into the wilds

Post by cartons »

Image

I was editing an area, Farmland NE, (nothing major, added a couple of props that trigger based on an event in another area), and it looks like it got bugged out. Above is the error I get now when I try to open the area in the editor. It also crashes the game when I try to enter that area.

I'm using IB 198. When I transferred my game, for some reason this Farmland NE made 5 duplicates of itself named Farmland NE_0_, Farmland NE_1_, ... Farmland NE_4_. When I delete them all, instead of the above error message, I get an error message saying that it can't find those numbered versions. Reinstating the duplicates just gives me the above error.

Any idea what happened?
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Preparation before heading into the wilds

Post by slowdive »

It seems like this area was changed to be one of the seamless edge type maps. I don't really understand how they work, but they have linked neighbor maps and I think those are the ones with _0, _1, _2, etc. If you delete those areas, you may need to go into the Farmland NE area file and remove any references to those edge files. I think I accidently did the same thing when clicking on some of the buttons in the area editor that I wasn't familiar with and I wanted to see what they did. I ended up going into my area file and deleting some things in the first part so that they looked like my other normal area files. This is the part with the "linked" stuff at the beginning of the area files:

Code: Select all

{
  "linkedAreasCounter": 0,
  "masterOfThisArea": "none",
  "linkedAreas": [],
  "linkNumbers": [],
  "linkNumberOfThisArea": -1,
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Re: Preparation before heading into the wilds

Post by cartons »

I found what was causing the bug. I've been using the Neighbour function to link adjacent maps, and at a certain point, instead of leaving blank the squares for a cardinal direction that led to no adjacent maps, I wrote in 'none'. The engine was then searching for a map called 'none' and found nothing: *beep*boop*error*!.
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Preparation before heading into the wilds

Post by slowdive »

Ah, that makes sense, good catch.
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Re: Preparation before heading into the wilds

Post by cartons »

I've been using this thread to ask small-ish questions about the editor so as to not flood the forum, but let me know if you'd prefer if I create separate topics instead for ease of future reference.

--

I'm trying to launch a conversation after an encounter.

In the Encounter properties, I've got the OnEndCombatIBScript Hook set to DoConvo, with the parameter set to the conversation I want, but when I test it, winning the encounter does not trigger the conversation. This is the case whether I have special victory conditions or not.

What am I missing?
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Preparation before heading into the wilds

Post by slowdive »

I usually have the conversation on the next event of the trigger. So if the encounter is trigger event 1 then the conversation is on trigger event 2. I don't use the OnEndCombatIBScript hook for conversations. If the encounter is called from a prop, then I'd have to try and dig through that code to figure that out.
zach_holbrook
Posts: 94
Joined: Thu Jan 16, 2020 5:00 am

Re: Preparation before heading into the wilds

Post by zach_holbrook »

Cartons, I'm not sure why the convo won't fire--I have multiple encounters that use the setup you describe. It might have something to do with how the combat itself is called, like Slowdive suggested. All my encounters begin with a script called through conversation. (The narration sets up the combat, and then there's an option to skip the combat or go ahead with it.)
User avatar
Dorateen
Posts: 326
Joined: Thu Jan 16, 2020 3:03 pm

Re: Preparation before heading into the wilds

Post by Dorateen »

cartons wrote: Sun May 16, 2021 2:35 am
I'm trying to launch a conversation after an encounter.
I also set up post-encounter conversations the way slowdive described. Use the trigger properties, and put the conversation in the event right after the combat event.
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Re: Preparation before heading into the wilds

Post by cartons »

Thanks for the feedback, everyone.

The problem was indeed that the combat was triggered from the Prop. Here is the line of events that DOESN'T work:

Prop STEP: conversation > conversationX

conversationX > encounterY

encounterY OnEndCombatIBScript > conversationZ


What DOES work:

triggerW > conversationX

conversationX > encounterY

encounterY OnEndCombatIBScript > conversationZ


I'll probably continue to use the IBScript to trigger a post-encounter conversation because if the encounter was optional, based on choices in the preceding conversation, I'd like to not necessarily be locked into the next conversation lined up in that trigger.
Post Reply