Jump to content

Home

Hardcore Mod and Modding


MightyMidget

Recommended Posts

  • Replies 53
  • Created
  • Last Reply

Sweet, thanks man.

 

Another Question lol.

 

I'd love to be able to use a value from like a .ini file to modify the difficulty so that people who use the mod can make it easier or harder just by changing the value. 1.0 = normal, 1.2 = 20% harder 0.8 = 20% easier.

 

Is there any way to get a value out of a .ini file or other text format file?

Link to comment
Share on other sites

Are you sure Talchia's Hardcore mod worked for every enemy? Because upon changing the stat boosts to noticably huge amounts I notice that some enemies on the Endar Spire (The first 10 or so) don't get the boosts, but the next 2 after them do.... could this be a pattern? I.e. What if it skips leveling up lots of other npcs? What do you think might be causing this erratic behaviour? Any ideas?

 

EDIT:

 

Well I added a graphical effect to show which objects get modded and it seems that there were a couple exceptions on the Endar Spire but that every other enemy and nuetral NPC gets the boosts. So that's cool.

Link to comment
Share on other sites

Well you can't use an .ini file w/ scripts but you could have a dialog somewhere that sets a Global Variable that you can use. The dialog could be an armband so you take it with you and change it later. Or attach a branch to the Ebon Hawk or whatever your imagination can dream up.

Link to comment
Share on other sites

Could someone explain to me a little of how KOTOR works? I mean the combat. What are saving throws? What's DC? Essentially what generally happens in a round of attacks - behind the scenes? I'd like to know this so I can feel comfortable about modifying the number of enemy saving throws and such. Thanks.

 

Also, does anyone know if there's a way to get past the limit on increasing a target's abilities? The game imposes a limit of 20 max extra of an attribute :(. I tried increasing the same ability more than once but the game just ignored it. (Wrote an if statment with a graphic effect to check the Ability of my target). Thanks all.

Link to comment
Share on other sites

Originally posted by MightyM

Could someone explain to me a little of how KOTOR works? I mean the combat. What are saving throws? What's DC? Essentially what generally happens in a round of attacks - behind the scenes? I'd like to know this so I can feel comfortable about modifying the number of enemy saving throws and such. Thanks.

 

Also, does anyone know if there's a way to get past the limit on increasing a target's abilities? The game imposes a limit of 20 max extra of an attribute :(. I tried increasing the same ability more than once but the game just ignored it. (Wrote an if statment with a graphic effect to check the Ability of my target). Thanks all.

 

some quick and dirty

saving throw: happens when somebody casts a spell/uses a force power directed at you and it is a default attempt to resist the effects. this also aplies on resisting toxins and the sort.

 

dc=difficulty check: a DC is set anytime you are trying to overcome a challenge eg. opening a lock or hacking a computer. it used in saving throws and skill checks as well as when actually using a force power.

 

combat round: initiative; who attacks first or who responds first is more like it.

your action; shooting, melee attack, movement, force power, or some other action.

combat round resolution; self explanatory.

 

now to take a stat past the game inforced 20 you need equipment that enhances that. the highest effect that each piece of equipment can apply is 10 so if every piece of equipment gave a 10 and you have 2 weapons in hand and capped at 20 you could get a 110 max stat.

 

if you want to make enemies harder to defeat bumping up there saves will definetly do this as it will make it harder for your force powers to overcome there saving throw.

Link to comment
Share on other sites

now to take a stat past the game inforced 20 you need equipment that enhances that. the highest effect that each piece of equipment can apply is 10 so if every piece of equipment gave a 10 and you have 2 weapons in hand and capped at 20 you could get a 110 max stat.

 

In theory you could hide these objects on the .utc by putting them into hidden equipment slots. For more information see this thread.

Link to comment
Share on other sites

Thanks darktender for the info :D.

 

About the adding equipment. This raises two issues.

 

The first one is, can I add equipment to NPCs using the on perception (Case 1002) of the K_AI_Master file? Will it take effect immediately?

 

And how many peices of equipment can I add? Can I add as many as I like or is this limited by a certain number of equipment slots that the AI has?

 

If I can add a lot of equipment then this would be ideal.

Link to comment
Share on other sites

Use this function: (from nwscript.nss)

// 32: Equip oItem into nInventorySlot.
// - nInventorySlot: INVENTORY_SLOT_*
// * No return value, but if an error occurs the log file will contain
//   "ActionEquipItem failed."
void ActionEquipItem(object oItem, int nInventorySlot, int bInstant=FALSE);

 

Example:

object oItemBooster1=CreateItemOnObject("uti_templateresref1");
object oItemBooster2=CreateItemOnObject("uti_templateresref2");
object oItemBooster3=CreateItemOnObject("uti_templateresref3");
object oItemBooster4=CreateItemOnObject("uti_templateresref4");
ActionEquipItem(oItemBooster1, INVENTORY_SLOT_CWEAPON_L, TRUE);
ActionEquipItem(oItemBooster2, INVENTORY_SLOT_CWEAPON_R, TRUE);
ActionEquipItem(oItemBooster3, INVENTORY_SLOT_CWEAPON_B, TRUE);
ActionEquipItem(oItemBooster4, INVENTORY_SLOT_CARMOUR, TRUE);

Remember, you'll have make sure these .uti files have BaseItem set to an entry in baseitems.2da whose EquipableSlots has a value that supports these slots.

Link to comment
Share on other sites

(Ponders...)

Those slots I listed are pretty safe, but you never know...

 

but you have this function:

// 155: Get the object which is in oCreature's specified inventory slot
// - nInventorySlot: INVENTORY_SLOT_*
// - oCreature
// * Returns OBJECT_INVALID if oCreature is not a valid creature or there is no
//   item in nInventorySlot.
object GetItemInSlot(int nInventorySlot, object oCreature=OBJECT_SELF);

 

so you could encapsulate the code in an IF statement like

if (!(GetIsObjectValid(GetItemInSlot( INVENTORY_SLOT_CWEAPON_L)))) {
 ActionEquipItem(oItemBooster1, INVENTORY_SLOT_CWEAPON_L, TRUE);
}
Link to comment
Share on other sites

It looks like very few NPCs use these slots. The ones that do like Canderous and HK47 only use the last of the 4 INVENTORY_SLOT_CARMOUR. It'll need further looking into, but if this is the case and I can depend on 3, and maybe even 4 slots free for all enemies.... man I could boost stats quite comfortably by as much as 30 or 40.

 

Thanks for the help. I'll probly have to ask a couple questions later in the week when I get around to adding the custom items and implementing the script that equips them into my new K_AI_Master file.

Link to comment
Share on other sites

Actually yea, I just noticed that. All beasts use them. They're usually equipped with claws. :(. The good news is that I haven't found an NPC that uses all 4 slots. Essentially i'll have to build some tricky logic into my script, but I can just get it to use whatever slots are free.

 

Fact is, beasts don't usually use the other slots (left right arm and hand, belt, head etc.) so I can just use these slots on the beasts to make up for the lack.

Link to comment
Share on other sites

Originally posted by tk102

Better make your items completely invisible then, otherwise all the tachs and gizkas will be carrying stuff around on them. (Maybe... I don't know much about modeling.)

Don't worry, you can give a lightsaber to a Gizka and although the Gizka will be able to bite harder, the lightsaber won't appear. remember my "morphing accident" with Jolee while I was having fun with force powers :D ? http://img.photobucket.com/albums/v144/Darth333/PlayAsGizka.jpg

Link to comment
Share on other sites

Archived

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


×
×
  • Create New...