Jump to content

Disable XP and character progression?


TokyoRose

Recommended Posts

Hi all.

 

I've dusted off my copy of Silent Storm Sentinels after two years and I'm ready to give it another go. I played through the campaign at least a dozen times between 2004 and 2006, and the biggest problem with S3, as far as I'm concerned, is the XP system, which is basically broken.

 

After your squad members reach a certain level, it's way too easy to shoot and kill enemies and the battles lose all their tension. The game falls apart and loses all balance.

 

What I'd like to do is turn off character progression and the XP system, either through a script or a console command or a mod.

 

I want to customize my characters' skills, perks, and attributes using console commands (I already know how to do this), and then freeze them in place so these abilities never change.

 

I know I can continually reset characters to level 1 with the UnitSetXPLevel console command, but that resets all their attributes, which I don't want to do.

 

Any help? Novik? KoMik?

Link to comment
Share on other sites

I don't know about freezing XP growth, but you could modified a AutoLoad script by adding there custom functions with skill commands to your characters.

 

function unitIsActive( unit )
local a = IsValid( unit ) and UnitCanFight( unit )
return a
end

function resetHeroValues()
if unitIsActive( GetHero() ) then
	UnitSetSkillMaxValue( GetHero(), skillName, skillValue )
	UnitSetSkill( GetHero(), skillName, skillValue )
-- add you own skillNames and skillValues to all skills for hero
end
end

function resetMemberValues( member, class )
if class == 1 then
-- soldier?
	if unitIsActive( GroupGetUnit( GetParty(), member ) ) then
		local unit = GroupGetUnit( GetParty(), member ) 
		UnitSetSkillMaxValue( unit, skillName, skillValue )
		UnitSetSkill( unit, skillName, skillValue )
-- add you own skillNames and skillValues to all skills for the current class member
	end
elseif class == 2 then
-- grenadier?
-- continue same way to next characters' classes
end
end

If you make it like that, then you could just open console and write resetMemberValues( 1, 2 ) to reset your second merc's (which I assume, is a grenadier) values and so on.

 

AutoLoad scripts are in "scripts" folder and can be used via console. Maybe you should write your functions to s3Common.l file (and maybe copy-paste a backup file first :laugh:). if you are using Notepad, then save the file via x-close button because the special file format. AutoLoad scripts will be loaded when you enter a map, so in-mission save games doesn't use new, modified, scripts.

Link to comment
Share on other sites

Ha! Brilliant. Thanks so much! :laugh:

 

After all this time, I really wasn't expecting a response ...

 

So if I understand correctly, once I configure the script, I can basically reset my characters the way I like -- skills, attributes, perks -- with a single command resetMemberValues( 1, 2 ) in the console, right?

 

Can I use the character's name? For example, resetMemberValues( Viper, Abala )?

 

Is there a way to run the script every 60 seconds or so? I know some mods have done stuff like that. Or maybe I can bind the command to a key in my input.cfg.

 

Thanks a million times over, KoMik. You've just given me reason to play through S3 a dozen times again.

 

Oh, and if I can push my luck: Do you have a list of all the perks numbers (UnitTakePerk XX)? I used to have one back in 2006, but I lost it when I upgraded my computer. For example, perk 94 = look for free, perk 57 = stop bleeding, etc.

Link to comment
Share on other sites

So if I understand correctly, once I configure the script, I can basically reset my characters the way I like -- skills, attributes, perks -- with a single command resetMemberValues( 1, 2 ) in the console, right?

Yes, but would recommed the chance to make as many custom functions to AutoLoad script as you wish.

 

Can I use the character's name? For example, resetMemberValues( Viper, Abala )?

Well, I'm not sure about Sentinels, but Hammer & Sickle has a command which can check out unit's name, you could try it:

 

local uName = UnitGetName( unit )

if (uName==VIPER) then

...

end

 

Is there a way to run the script every 60 seconds or so? I know some mods have done stuff like that.

Yes, you could use SleepForTurn() command or just Sleep( 100 ):

 

function startResetingHero()

while (unitIsActive(GetHero() ) ) do

resetHeroValues()

SleepForTurn()

end

end

 

When you enter a map, write startResetingHero().

 

Or maybe I can bind the command to a key in my input.cfg.

I do not know about binds.

 

Oh, and if I can push my luck: Do you have a list of all the perks numbers (UnitTakePerk XX)? I used to have one back in 2006, but I lost it when I upgraded my computer. For example, perk 94 = look for free, perk 57 = stop bleeding, etc.

I had this in old S3 store... sorry about the jpeg format, but I'm/was too lazy to write them all ;)

post-3446-1222336307_thumb.jpg

 

Ha! Brilliant. Thanks so much! :laugh:

No problemande. Cheers!

Link to comment
Share on other sites

Perfect -- and thanks for the perk list. I had tried about 100 different Google searches to find it, with no luck.

 

One quick question: I've always used the UnitSetSkillMaxValue command. For example, UnitSetSkillMaxValue(GetHero(),ST_ENGINEERING,75).

 

But what does UnitSetSkill do?

 

Now, forgive me, because I'm terrible with scripts. In fact, I'm script illiterate. I need you to spoon-feed me a bit. Here's what I have right now. What have I done wrong?

 

function unitIsActive( unit )
local a = IsValid( unit ) and UnitCanFight( unit )
return a
end

function resetHeroValues()
if unitIsActive( GetHero() ) then
UnitSetSkillMaxValue( GetHero(),ST_ENGINEERING, 75)
UnitSetSkillMaxValue( GetHero(),ST_MEDICINE, 75)
UnitSetSkillMaxValue( GetHero(),ST_AP, 60)
UnitSetSkillMaxValue( GetHero(),ST_STEALTH, 50)
UnitSetSkill( ??? what does this do ???)
end
end

function resetMemberValues( member, class ???? not sure what to do here)
if class == 1 then
-- soldier?
if unitIsActive( GroupGetUnit( GetParty(), "Viper" ) ) then
local unit = GroupGetUnit( GetParty(), "Viper" )
UnitSetSkillMaxValue( "Viper", ST_SNIPE, 75)
UnitSetSkill( ??? )
-- add you own skillNames and skillValues to all skills for the current class member
end
elseif class == 2 then
-- grenadier?
-- continue same way to next characters' classes
end
end

Link to comment
Share on other sites

Try these...

 

function unitIsActive( unit )
local a = (IsValid( unit ) and UnitCanFight( unit ))
return a
end

function resetHeroValues()
if unitIsActive( GetHero() ) then
	UnitSetSkillMaxValue( GetHero(), ST_ENGINEERING, 75 )
	UnitSetSkill( GetHero(), ST_ENGINEERING, 75 )
	UnitSetSkillMaxValue( GetHero(), ST_MEDICINE, 75 )
	UnitSetSkill( GetHero(), ST_MEDICINE, 75 )
	UnitSetSkillMaxValue( GetHero(),ST_AP,  60 )
	UnitSetSkill( GetHero(), ST_AP,  60 )
	UnitSetSkillMaxValue( GetHero(), ST_STEALTH, 50 )
	UnitSetSkill( GetHero(), ST_STEALTH, 50 )
	out( "Hero reseted" )
end
end

function resetMemberValues( unit )
local uName = UnitGetName( unit )
if (unitIsActive( unit ) and (uName == "VIPER")) then
	UnitSetSkillMaxValue( unit, ST_SNIPE, 75 )
	UnitSetSkill( unit, ST_SNIPE, 75 )
	out( "Viper reseted" )
elseif  (unitIsActive( unit ) and (uName == "ABALA")) then
	UnitSetSkillMaxValue( unit, ST_MEDICINE, 75 )
	UnitSetSkill( unit, ST_MEDICINE, 75 )
	out( "Abala reseted" )	
-- add you own skillNames and skillValues to all skills for the current member
else
	out( "No values to reset for that name!!! ", uName)
end
out( "Reseting ends" )
end

function resetThemAll()
resetHeroValues()
local party = GetParty()
local hero = GetHero()
if hero == nil then
	out( "No hero found!!!")
	return
end
GroupRemoveUnit( party, hero )
for i = 1, GroupGetSize( party ) do
	local unit = GroupGetUnit( GetParty(), i )
	if (unit ~= nil and unitIsActive( unit )) then
		resetMemberValues( unit )
	end
end
end

Now you may use:

- resetHeroValues() for hero

- resetThemAll() to your whole group (be sure you set values for all mercs' names to resetMemberValues function)

 

But what does UnitSetSkill do?

I'm not actually sure, but I think it sets the value correctly after UnitSetSkillMaxValue command.

Link to comment
Share on other sites

Sorry for the delay -- I was all webbed up with work and I didn't have a chance to play.

 

I pasted the script into my s3commonl.file exactly as you gave it to me.

 

My party consists of the hero, Viper and Abala. I see the following error messages in the console when I enter a new map and when I enter the resetHeroValues() and resetThemAll() commands:

 

"Value was NIL when getting global with name resetHeroValues"

"Value was NIL when getting global with name resetThemAll"

"Value was NIL when getting global with name DelayGameStartEx"

"Value was NIL when getting global with name OnEnterZone"

"Waypoint UnitHero not found"

Link to comment
Share on other sites

Strange, because it worked pretty well (even there was couple mistakes) when I tried it. Did you load a save game and then tried in base? Modified AutoLoad scripts aren't in use in base if it's already entered. You have to restart campaign to get them work in base, but in random encounters and missions they work ok.

 

P.S. Here is my s3Commol.l file for you, I also fixed the bugs from the previous post's code box.

 

https://koti.mbnet.fi/sil5i/mods/s3Common.zip (4k)

 

Btw edit: Notepad is not good for coding (it's actually not good for anything :laugh:) so try this one...

 

https://www.farmanager.com/

Link to comment
Share on other sites

BINGO! That did it. :laugh:

 

At this point it should be a simple matter of following your work and filling in the blanks for the rest of my squad. I'll post back or PM you if I run into any more trouble, but I'm confident I can figure out the rest. Thanks a million. You've just renewed the whole S3 experience for me.

 

Two more questions which you may or may not be able to answer:

 

1) I know how to add perks to characters. Is there a way to remove perks via the console? I'm trying to make the game HARDER, and some of my favourite characters (such as Viper) are too powerful with all their perks.

 

2) The Nival forums are down, but once upon a time someone posted instructions on how to turn off the green outline that surrounds the active character. Should be in S3config, but I think I turned off almost every GFX variable with no luck.

Link to comment
Share on other sites

  • 10 months later...
1) I know how to add perks to characters. Is there a way to remove perks via the console? I'm trying to make the game HARDER, and some of my favourite characters (such as Viper) are too powerful with all their perks.

 

I'm interested in how to do this as well. The UnitTakePerk isn't a toggle apparently, so running it on a perk that a unit already has doesn't take it away... There doesn't seem to be an obvious console command to drop unwanted perks.

 

Worst case, would it work to add a low-level version of that hire-able PC and add only the perks we want via the console? That seems like a bit of a pain, though.

Link to comment
Share on other sites

Just stating the obvious, but couldn't you just choose not to pick any perks when a character levels up? Obviously this doesn't help if you are in the middle of a campaign, but it would if you restart. *Shrugs* ;) And I guess it wouldn't be of any use if you want to pick and choose what perks you want to have. :)

 

- Zombie

Link to comment
Share on other sites

I'm actually trying to, without mods (since MapEditor isn't agreeing with me today... well, dataimport.exe is the problem, technically) downgrade a high-level, expensive hire-able merc down to my hero's level, as well as strip him of most of his perks (which would make the game a little too easy).

 

Dropping his level is as easy as "setxplevel x" (and tweaking stats and skills is just as simple), but all his perks are assigned before I can get him out of the filing cabinet.

 

Anyone have any ideas? I do realize I'm reviving a year-old thread. ;)

 

EDIT: Ostensibly, Cookie's Character Mod should do just this (reducing price to $5K, while dropping all the hires to level 1 and removing all perks), but all it does for me is just change the price... I don't really want them all to be level 1, just one specific character (and buy the rest as they enter my price/level range), but I guess that'd be okay, since I could use SetXPLevel, UnitSetSkillMaxValue, UnitTakePerk, etc. to bring them up to speed.

Link to comment
Share on other sites

Dropping his level is as easy as "setxplevel x" (and tweaking stats and skills is just as simple), but all his perks are assigned before I can get him out of the filing cabinet.

Ah! Yep, I forgot new hirees already have their perks chosen. Sorry for my forgetfulness. :)

 

Maybe Cookie's mod + some console commands will work for you then. Sounds like a lot of work though. ;)

 

- Zombie

Link to comment
Share on other sites

I'm actually trying to, without mods (since MapEditor isn't agreeing with me today... well, dataimport.exe is the problem, technically) downgrade a high-level, expensive hire-able merc down to my hero's level, as well as strip him of most of his perks (which would make the game a little too easy).

 

Once you get the Map Editor working properly, this is a very simple fix: Base Values -> Level. Just change this entry to 1 for whichever characters you want.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...