tk102 Posted December 6, 2004 Share Posted December 6, 2004 You da' man MightyM. If you have any other script questions, feel free to post them. and yes they're the same. and gold=credits in scripting too. Link to comment Share on other sites More sharing options...
MightyMidget Posted December 6, 2004 Author Share Posted December 6, 2004 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 More sharing options...
MightyMidget Posted December 7, 2004 Author Share Posted December 7, 2004 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 More sharing options...
tk102 Posted December 7, 2004 Share Posted December 7, 2004 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 More sharing options...
MightyMidget Posted December 7, 2004 Author Share Posted December 7, 2004 Ah, that should work well, thanks. Link to comment Share on other sites More sharing options...
MightyMidget Posted December 7, 2004 Author Share Posted December 7, 2004 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 More sharing options...
deathdisco Posted December 7, 2004 Share Posted December 7, 2004 A good place to start would be to check the in-game feedback page. This should give you an idea as to what's heppening behind the scene. Also I'm sure RedHawke might be able to give you a good explanation of what the mechanics are. Link to comment Share on other sites More sharing options...
Darkkender Posted December 7, 2004 Share Posted December 7, 2004 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 More sharing options...
tk102 Posted December 7, 2004 Share Posted December 7, 2004 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 More sharing options...
MightyMidget Posted December 7, 2004 Author Share Posted December 7, 2004 Thanks darktender for the info . 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 More sharing options...
Darkkender Posted December 7, 2004 Share Posted December 7, 2004 Originally posted by tk102 In theory you could hide these objects on the .utc by putting them into hidden equipment slots. For more information see this thread. I guess that means now that you mention it we could get up to 150 for an ability score(forgot those 4 slots.) Link to comment Share on other sites More sharing options...
MightyMidget Posted December 7, 2004 Author Share Posted December 7, 2004 Ok suppose I wanted to add four pieces of equipment dynamically to each enemy using the K_AI_Master file. Would this be possible? How? Link to comment Share on other sites More sharing options...
tk102 Posted December 7, 2004 Share Posted December 7, 2004 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 More sharing options...
MightyMidget Posted December 7, 2004 Author Share Posted December 7, 2004 Excellent. But what if a npc is using the slot I try to equip somthing in? Is there any slot that will equip more than one item? Can I ever count on a particular slot always existing for all NPCs and always being able to be equipped with my item? Link to comment Share on other sites More sharing options...
tk102 Posted December 7, 2004 Share Posted December 7, 2004 (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 More sharing options...
MightyMidget Posted December 8, 2004 Author Share Posted December 8, 2004 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 More sharing options...
Darth333 Posted December 8, 2004 Share Posted December 8, 2004 If I remember correctly, rackghouls also use them (poison effect). And perhaps a few other beasts too but I didn't checked. Link to comment Share on other sites More sharing options...
MightyMidget Posted December 8, 2004 Author Share Posted December 8, 2004 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 More sharing options...
tk102 Posted December 8, 2004 Share Posted December 8, 2004 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.) Link to comment Share on other sites More sharing options...
MightyMidget Posted December 8, 2004 Author Share Posted December 8, 2004 Yea, totally invisible. All I want them for is boosting stats, so why bother about a graphic? this is gonna be sweet. Link to comment Share on other sites More sharing options...
Darth333 Posted December 8, 2004 Share Posted December 8, 2004 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 ? http://img.photobucket.com/albums/v144/Darth333/PlayAsGizka.jpg Link to comment Share on other sites More sharing options...
MightyMidget Posted December 11, 2004 Author Share Posted December 11, 2004 Can you create an item that is equipable on more than one kind of slot? Say I wanted to make an item able to be equiped on every slot there is, would this be possible or would I need to make a new item for each kind of slot? Link to comment Share on other sites More sharing options...
tk102 Posted December 11, 2004 Share Posted December 11, 2004 See this post. The thread has useful info too. Link to comment Share on other sites More sharing options...
MightyMidget Posted December 11, 2004 Author Share Posted December 11, 2004 Sweet. How about modifying Charisma with items? How would I do this in the item properties area? Link to comment Share on other sites More sharing options...
MightyMidget Posted December 11, 2004 Author Share Posted December 11, 2004 Strictly Speaking modifying Wisdom will have the same effect on an AI Jedi as modifying Charisma right? So I don't really need to modify Charisma as well? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.