Jump to content

Questions to kit creation


jastey

Recommended Posts

1. If a custom kit crashes the game to desktop the moment I klick on the "level-up" button (if my NPC could level up), does anyone have an idea what this might be caused from? Everything else (joining into the group, using of custom special abilities etc.) works fine, if I level up with NI everything is fine, it's only the "level-up" screen that doesn't load but CTD.

 

2. If I want to make a kit (not the same as above) that also serves as a race of an NPC (it's another drow - sorry), is that possible? Is it possible to give an NPC the race "Drow" and give him some of the abilities (dayblindness, magical resistance) drow should have via kit? Is there a mod that does that already?

 

Thank you for any hints and answers.

Link to comment
1. If a custom kit crashes the game to desktop the moment I klick on the "level-up" button (if my NPC could level up), does anyone have an idea what this might be caused from? Everything else (joining into the group, using of custom special abilities etc.) works fine, if I level up with NI everything is fine, it's only the "level-up" screen that doesn't load but CTD.

 

2. If I want to make a kit (not the same as above) that also serves as a race of an NPC (it's another drow - sorry), is that possible? Is it possible to give an NPC the race "Drow" and give him some of the abilities (dayblindness, magical resistance) drow should have via kit? Is there a mod that does that already?

2. Well, there is a mod called "FinnJO's Subrace mod" that does exactly what you are suggesting well kinda, now you can go and look on what the mod maker did and copy the process, and then adjust it to your liking... so yes, it should be more than possible.

 

1. Well, if you dual class to a non-dual class -able combo, the game will crash, so say you want to make a ranger that the kit will then dual to a druid, the game will auto crash... there's ways to go around that by adjusting either of the classes to the fighter/druid or ranger/cleric, but it can never be a ranger/druid. We'll unless you make the class combo viable by editing the games .exe, class tables etc -which no one has ever done, well successfully.

Others, like if the character has a bow(two handed weapon), and then the kit adds a shield, the game will crash... etc.

There's a few of those ...

Link to comment
1. If a custom kit crashes the game to desktop the moment I klick on the "level-up" button (if my NPC could level up), does anyone have an idea what this might be caused from? Everything else (joining into the group, using of custom special abilities etc.) works fine, if I level up with NI everything is fine, it's only the "level-up" screen that doesn't load but CTD.
I'd check the CLAB, some AP_'s could be funky. If it doesn't crash with empty CLAB, then the problem is with SPLs listed in there.

 

2. If I want to make a kit (not the same as above) that also serves as a race of an NPC (it's another drow - sorry), is that possible? Is it possible to give an NPC the race "Drow" and give him some of the abilities (dayblindness, magical resistance) drow should have via kit? Is there a mod that does that already?

I don't think you want to go that far? Viconia is a drow and has magic resistance along with dark skin, but otherwise she's treated liek a regular elf cleric.
Link to comment

Thank you for your answers.

 

How do I know the kit is trying to dual class to something else? (Yes, The question is serious...) It is defined using the ADD_KIT, where in there I can define a dual-class - ing? In the usability flags that are added to the end of the KITLIST.2da entry? EDIT, ah, no, it's in the DUALCLAS.2da entry? The kit has 0 0 0 0 0 0~ here, so invalid dual-classing isn't the problem, I fear.

 

Maybe I should ask the other way around: How would I realise a kit that disables all weapons and armor in the game for the NPC (because it is not a umanoid creature), but of course I want to be able to design custom weapons for it?

Link to comment
How do I know the kit is trying to dual class to something else? (Yes, The question is serious...) It is defined using the ADD_KIT, where in there I can define a dual-class - ing? In the usability flags that are added to the end of the KITLIST.2da entry? EDIT, ah, no, it's in the DUALCLAS.2da entry? The kit has 0 0 0 0 0 0~ here, so invalid dual-classing isn't the problem, I fear.
Erhm, if the kit uses the add_kit command, it's assigned in a script... usually to an invisible character... that the kits "abilities 2DA file" casts... if it's your own kit, then you don't need to worry unless you use someones files ... if the dualcles.2da entry has only zeroes, it just prevents the player from dualing the character, it doesn't mean a script can't force it to. Of course you can see the possible dual-classing options you have if you look at the base classes entries in the file.

 

Maybe I should ask the other way around: How would I realise a kit that disables all weapons and armor in the game for the NPC (because it is not a umanoid creature), but of course I want to be able to design custom weapons for it?
Well, you just hope the usability flags cover all and go rampart with them... like so, you make the kit and at this line, you put this:

 // KITLIST.2DA
~0xeeeeeeee x~ //the x is the base class, the e's are the hex decimal number 15 that the 1+2+4+8 total into. 

And then you custom equip the items via the script you assign to a possible invisible creature that forces the summoner to equip them etc... , or make the items usable to everyone and everything.

 

If you would like to, you could PM me the kits description, and what you want out of it and I could help more on the lines of direct help in the .tp2 code etc, and see if what you want is possible...

Link to comment

ToBEx has stuff you might be interested in.

  1. You could permanently equip weapons/armor to the character (like Boo).
    Item Restrictions
     
    TobEx externalises creature-specific item restrictions to ITEM_USE.2DA. This allows modmakers to customise specific item restrictions for creatures in the style of Minsc's Boo and Xan's Moonblade.
     
    ITEM_USE.2DA
     
    [ROWNAME]: the resource name of the item that the item-creature restrictions apply to
    USER: death variable/script name of creature (not case-sensitive)
    STRREF#: the string reference to display in the inventory screen when the restriction indicated by the flag value of # applies
    FLAG: bitfield indicating the type/s of restriction to apply
     
    FLAG bits
    • bit 0 [1]: the item cannot be picked up from any slot of the creature (this overrides bits 3 and 4)
    • bit 1 [2]: the item can only be equipped by the creature (this is 'stackable', so multiple item entries with different creatures mean that each of the listed creatures can equip the item)
    • bit 2 [4]: no restrictions (this bit is reserved for GemRB)
    • bit 3 [8]: the item cannot be picked up from any equipped slot of the creature
    • bit 4 [16]: the item cannot be picked up from any inventory slot of the creature
    • bit 5 [32]: the item cannot be dropped into any equipped slot of the creature
    • bit 6 [64]: the item cannot be dropped into any inventory slot of the creature
    •  

      Example

      [/th][th]USER STRREF FLAG STRREF2 STRREF4 STRREF8 STRREF16 STRREF32 STRREF64
      MISC84 MINSC 10218 3 10218 -1 -1 -1 -1 -1

       

      Item MISC84 cannot be picked up from any slot of "Minsc", and can only be equipped by "Minsc".

    [*]You could prevent the character from using certain item types using opcode 181, which functions correctly when ToBEx is installed.

Link to comment

Thank you very much for your ideas!

 

Jarno Mikkola: Thank you ver much for the offer. I will try some more things but I will come back to your offer before I through the monitor out the window!

One question to your invisible creature: Are you talking about the way the game handles its kits, or are you talking about how I would realise a new kit for the PC in my mod?

 

I am still confused about the weapon restrictions problem - what I don't understand: If I find a way to forbid every weapon type for my NPC (any way of what you all proposed), what kind of custom weapon could i then still assign in the weapon slot - without provoking a game crash? Is it possibe to e.g. equip an item to the weapon slot that makes damage like a weapon but is not defined as a weapon in the sense of the sword/mace/flail/missile etc. definitions of the game? If yes, what would the item be, a "misc" item?

Link to comment

The fixed "Can't use itemtype" opcode #181 probably makes it so creatures cannot *equip* the items normally, the same way plain wizards can't equip swords. I don't think this sort of restriction prevents you from changing a wizard's .cre file so they have a sword equipped or from using scripting (FillSlot) to put a sword into their weapon slot. So long as there are animations for wizards wielding swords, this should not crash the game.

 

The ToBEx Item Restriction extension would then let you make it so your custom item equipped this way could not be removed manually.

 

This is just one proposed solution, but it's one of the cleanest I can think of. If you wanted to avoid using ToBEx, there is "can't use item" opcode #180, but you'd need to have a zillion effects to capture each individual weapon and armor. Also sticking with the vanilla game, maybe there is some way to handle the weapon aspect using the magical weapon slot.

Link to comment
One question to your invisible creature: Are you talking about the way the game handles its kits, or are you talking about how I would realise a new kit for the PC in my mod?
Well, like said, there are certain actions in the game that cannot be controlled via a single spell, but they need an actor that does the action to the target that's the kitted character... now, here's the invisible creature comes in, it is also tied to the caster as it knows it's summoner so it can actually target them specifically, it's available at the right time, when you level up to level y etc. nice things. There are various of task it can be made to do. Super kit the character, give tons of items, force a helm to be equipped to the belt slot, crash the game etc fun things. And they are easy to get rid of by adding a

   DestroySelf()
END 

To the end of their .baf file ...

Link to comment

Thank you again for your answers. I really appreciate it. It may well be that I'll ask questions to some of it later after having tried to code some more.

 

Qestions for now: What is the magical weapon slot? (After all these years of modding IE I feel really dumb!)

 

I used the ~0xeeeeeeee above which restricts the NPC from using nearly everything of the items. But, he can still equip blun22.itm and blun24.itm, some magical clubs. Does anyone know why? Because I tried to design a weapon forhim (a claw) that has the same specifications as these two clubs, but I couldn't get the custom weapon to be usable (it was assigned to the weapon slot but it was marked "red", i.e. unusable, which looked rather silly.) Could this be related to the "magical" flag of the clubs? (I didn't try making the claw "magical", maybe I should have tried that before asking here, but making it magical seemed not appropriate - it's a claw!).

 

This is bugging me: Before I start designing weapons and restrict my NPC to others - How great is the chance it will all be changed by some of the popular mods? Let's say, I restrict my NPC to all weapons, make blun22.itm and blun24.itm upon installation unusable (as far as i understood this is possible with the ITEM_USE.2DA and ToBEx) but design custom weapons [equipable like blun2x.itm were]. How big are chances this design will be made useless by some tweak of another mod?

 

I feel like designing a my-install-specific solution and it all crashes the instant someone else wants to play it on his install...

Link to comment
Qestions for now: What is the magical weapon slot? (After all these years of modding IE I feel really dumb!)
Well, it's the characters inventory slot that overwrites the characters current weapon, sililar to the fact as the normal weapons does to the fist. I haven't used it at all cause multiple weapon slots usually have more usage in the character usage, one for ranged attack, while the other for devouring purpose for example.

 

I used the ~0xeeeeeeee above which restricts the NPC from using nearly everything of the items. But, he can still equip blun22.itm and blun24.itm, some magical clubs. Does anyone know why? Because I tried to design a weapon forhim (a claw) that has the same specifications as these two clubs, but I couldn't get the custom weapon to be usable (it was assigned to the weapon slot but it was marked "red", i.e. unusable, which looked rather silly.) Could this be related to the "magical" flag of the clubs? (I didn't try making the claw "magical", maybe I should have tried that before asking here, but making it magical seemed not appropriate - it's a claw!).
What are you using to accomplice the weapon restrictions ? Weidu is bad... DLTCEP is a good tool as is the NearInfinity, if you use the games .dat file and keep it updated... yes, the last version should have the .dat file, if I remember correctly... it's here too in the last link.
Link to comment

The magical weapon slot isn't directly accessible by a character. If it's filled with a valid item, you can see it in the weapon slots of the main screen. While a magical weapon is in use, your character can't equip or unequip a real weapon.

 

0xeeeeeeee doesn't cover everything, 0xffffffff does. But that won't help you much because it only refers to the kit usability flags and a couple of items (clubs, staves, some mod-provided weapons) are usable by all kits. You would have to alter the usability flags of every weapon in the game if you want to make sure that no weapon is usable by your character.

Link to comment

That's a valid idea. I was kind of hoping to be able to give the player a choice of manually equipping the NPC with custom items/weapons, though.

 

I guess I have three possibilities:

1. Fill the weapon slots with unremovable custom weapons (that would be upgraded either automaticly upon level-up or by e.g. Cromwell, depending on the type of item). in this case, no game items would have to be flagged as non-usable as there would be no possibility to equip them.

 

2. Basically like 1. but that the NPC cannot use certain item types (realized by opcode 181) so the custom items would be flagged as "misc" (?, to prevent the red color) and equipped via script as for 1.

 

3. Make equipable (and removable) custom items and live with the fact that some game items / weapons are equipable, too (and count on the sense of the players to ignore it).

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...