Jump to content

Help with Configurable INI settings that interact with scripts


Gawesome

Recommended Posts

I have a class mod that has several abilities that provide damage bonuses. I'm trying to provide users with a configurable INI setting to allow for variable results.

 

I've tried it two ways:

 

1) Add a constant meant to be toggled.

 

In this example, SMG_Penalty defaults to 1. I want it so that if users edit the value in the ini to be 0, then my damage bonus scripts provide a different result.

 

In my tests, I can only get the different damage bonuses if I build the project, not by just saving the .ini file with a different value.

 

2. Add a new ability that the player can assign to the class data.

 

I scripted my damage bonus effects a different way and forked the damage bonus results based on whether or not the player had an ability. The idea was the users would be able to edit my mod's XComClassData.ini to give their class a different ability:

 

[spectreClass X2SoldierClassTemplate]

 

;;+SoldierRanks=( aAbilityTree=( (AbilityName="StalkerAR", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)
+SoldierRanks=( aAbilityTree=( (AbilityName="Stalker", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)
(Note: SolderRanks entries above left incomplete intentionally, this is just to illustrate what I mean in this message).
So the goal was to make it so that a user could uncomment the 1st line and comment out the 2nd line. This would then give them a different starting (squaddie) ability, which would then produce different damage bonus results in the class abilities.
Again, in this case, I can only get the results I want by building the project.
This is very confusing, as I've seen other mods out there that allow users to edit .ini files to affect parameters of class abilities, like cooldown values. What is it that I'm doing incorrectly?
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...