Jump to content
Sign in to follow this  
cpt_smagnet

To realize Stanima Effect

Recommended Posts

Hi~ I would like to ask, is it possible to simulate stanima in CWA, like in ACE Mod in Arma1/2? (cant run Arma3 so dunno about it)

I tried searching the forum and there was no answer so I have to bump it :P

 

The goal I would like to achieve is like this: the PLAYER gets more easily tired when moving with more equipment loaded on him. "Tiredness" may work like shakey aim, heavy breathing and reduced running speed, or even black out.

The built-in stanima system in CWA (that you get "tired" if you sprint for too long) does not take equipment weight into account, and has a ceiling, so you technically can run across a desert with a missile launcher and rest for some seconds before coming back fresh. Didn't like it so I came up with this quest, and I'm currently out of ideas, so please help~

 

I'm working on my own Total Conversion Mod, so these conditions might come in handy:

1. the Mod runs on CWA 1.99 (cannot downgrade to 1.96 though, got too dependant on the new scripting commands)

2. the Mod lives on Fwatch 1.14 but NOT 1.15 (my scripts doesn't work with 1.15 somehow)

3. the Mod has a script that loops every 0.01s (to monitor key inputs, night vision and optics and such)

 

Looking forward to any possible solutions! And I will share our final WORKING solution in this topic to close it!

 

Salute,

Share this post


Link to post
Share on other sites

Hi, I don't have a full solution, but a few points that might help:

 

Equipment load can be simulated by a script checking the magazines array, primary and secondary weapons and, based on the weapons/magazines found, assign numerical values for the weight. Those could be used in calculations later.

 

Simulating slowdown might be done via a script that reduces the relative velocity of the unit, but there might be better options with FWatch.

 

Having fatigue build up over time might be an issue - you could theoretically try to write a looping script that checks when and how long the unit is moving in a given velocity and somehow use that value to reduce stamina.

 

You can use the animChanged Eventhandler version 1.99 now has to check the current animation of a unit - if so, you could make custom, slower, running animations (maybe in intervals for varying states of fatigue) and implement them. For example, a unit with the eventhandler ["AnimChanged","[] exec ""ScriptToCheckAndChangeAnimation.sqs"""] should give you "CombatRunF" or something like that as (this select 1) value.

 

I hope those disorganized ideas are somewhat helpful!

 

Good luck.

  • Like 1

Share this post


Link to post
Share on other sites

If a moderator passes by, plz see if it is possible to correct the typo in the topic title "stanima", since it might be difficult to find this topic by "stamina" via searching for other people, thx!

 

Hi, I don't have a full solution, but a few points that might help:

 

Equipment load can be simulated by a script checking the magazines array, primary and secondary weapons and, based on the weapons/magazines found, assign numerical values for the weight. Those could be used in calculations later.

 

Simulating slowdown might be done via a script that reduces the relative velocity of the unit, but there might be better options with FWatch.

 

Having fatigue build up over time might be an issue - you could theoretically try to write a looping script that checks when and how long the unit is moving in a given velocity and somehow use that value to reduce stamina.

 

You can use the animChanged Eventhandler version 1.99 now has to check the current animation of a unit - if so, you could make custom, slower, running animations (maybe in intervals for varying states of fatigue) and implement them. For example, a unit with the eventhandler ["AnimChanged","[] exec ""ScriptToCheckAndChangeAnimation.sqs"""] should give you "CombatRunF" or something like that as (this select 1) value.

 

I hope those disorganized ideas are somewhat helpful!

 

Good luck.

Thanks for your ideas!

 

Setting up the database for equipment load for me is a heavy labor, but with a limited selection of equipments in a mod, that is eventually possible (if you don't throw in some JAM3 xD)

 

Fwatch, if I recall correctly, has no command for changing the velocity of a unit. It does return the INDEX (numbers like 76 rather than "CombatRunF") of the current animation of the PLAYER. Both working with the Fwatch anim commands and the "AnimChanged" EH requires a lot of data entering, too, so I think instead of tackling with anim, obtaining the velocity of the unit should solve most of the problem (except for special anims like climbing over a wall that has a small velocity but in reality is tiring, but those can be configured "tiring" via item "duty" in CfgMoves)

 

Speaking of CfgMoves, I might be able to make a few anim config myself but an entire chain of anim config is completely out of my hands  :(

 

So the ultimate problem is, how to reduce the "stamina"? We might not have to stick with the CWA/OFP hardcoded "stamina", but I just haven't thought of how else.

 

Thanks again!

Share this post


Link to post
Share on other sites
Simulating slowdown might be done via a script that reduces the relative velocity of the unit, [...]

 

I just realized I made an error there - man-class units themselves do not move by actual velocity, their movement is entirely based on animations (except in free fall). Looping a script that decelerates the velocity vectors won't do anything, I'm afraid.

 

I have no idea how to access the hardcoded stamina value, I might still come up with a loop for checking unit speed over time, given enough coffee and sleep.

 

If you decide to substitute standard animations for slower variants, it might be the best way to just copy-paste the vanilla moves and simply reduce the speed value for each interval - that's also gonna take a lot of coffee, though.

Share this post


Link to post
Share on other sites

Aye...man-class movements are entirely based on animations, that is new knowledge to me :o

 

And yeah we might have to stick with the loop check on unit speed to access the stamina value. Probably no way around it.

 

I will see if I can reach some other solutions, but RL is catching up on me so  :wacko:

 

Anyway thanks again for your input!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×