Sign in to follow this  
ProtoFlex

Referencing variables between mods.

8 posts in this topic

Hi, sorry if this is the wrong section.

I'm currently looking into getting ACE's medical system working with exile and am trying to reroute the damage done to the player from starvation and dehydration from Exile's health system to ACE's.
As far as I can see this is the section that applies the health decay depending on the value of the hunger and thirst attributes, it is contained within ExileClient_object_player_stats_update.sqf:

Spoiler

if ((ExileClientPlayerAttributes select 2) == 0 || (ExileClientPlayerAttributes select 3) == 0 || ExileClientPlayerIsBleeding) then
{
    ExileClientPlayerAttributes set [0, ((((ExileClientPlayerAttributes select 0) - ExileClientHealthDecay * _timeElapsed) min 100) max 0)];
};

I was wondering if it would be possible, using an override in the mission file, to replace the Exile health attribute with the one from ACE so the health decay is applied there instead, I've never done anything like this before in Arma so I'm not sure how to do it, from what I can see in ACE's files the name for the health value is bloodVolume I can roughly understand how the attributes are being referenced in Exile's files but to me it looks different in ACE. 

Thanks :) 

Share this post


Link to post
Share on other sites

Hello @ProtoFlex,

I know we have already talked about ACE and Exile before, there is a solution to this question that you have now.  I am not saying it is the 'best', it WILL work though...  ;)

What you need is a 'permanent' variable and not a 'temp' variable.

So what you COULD do:

1 - A call is made to Exile's health.  Sets vari '_health'.

2 - You have a script that contains something like MasterHealth = _health;

3 - You get the vari ACE uses, such as _ACEHealth

4 - In a script, you have _ACEHealth = MasterHealth;, then call ACE

This would 'transfer' the Exile values to ACE.

You also could have these in a script that is constantly updating 'MasterHealth' in a loop.

 

Bad example, but doable.  And in case you did not know what makes a temp vs a permanent variable, all it is, is the character '_' in front of the name.

_Temp = temp

Temp = permanent

 

Besides this, I think what I would do is to make an override that just disables the Exile health.  Then you do not have to worry about anything, for ACE would take over automatically.  I think this would be a LOT EASIER in the end to just disable Exile's health system.  You could point the 'No Exile Health' override(s) to a 'dummy script' which contains ZERO commands in it.  You get hurt, Exile then does nothing and ACE can do all the 'work'.

No muss...no fuss...and NO VARIABLES!  ;)

 

:)

 

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

You're welcome!  The variables in ARMA are 'confusing' to say the least.

Here are two pages which might help you if you have questions about any other 'types':

https://community.bistudio.com/wiki/Variables

https://community.bistudio.com/wiki/Magic_Variables

 

The disabling of Exile's heath system would be be the best I feel.  Then you have to do NOTHING but make the override and point to a ZERO BYTE file.  As I am not a mind reader, you MUST have this 'dummy file'.  IT MUST ACTUALLY EXIST.   It just is a zero byte file though (i.e., nothing in it).

And as far as disabling it, I have NO IDEA on how to do this nor how many overrides you may need in the end.

Also note, I am NOT an Exile scripting expert.  What I stated is what I THINK would work, in other words, an OPINION.  I feel that it should work though....

Again, good luck!

:)

 

Share this post


Link to post
Share on other sites
2 hours ago, Z80CPU said:

Besides this, I think what I would do is to make an override that just disables the Exile health.  Then you do not have to worry about anything, for ACE would take over automatically.  I think this would be a LOT EASIER in the end to just disable Exile's health system.  You could point the 'No Exile Health' override(s) to a 'dummy script' which contains ZERO commands in it.  You get hurt, Exile then does nothing and ACE can do all the 'work'.

 

I like this idea however the problem is with Exile's update stats file, this is where damage is handled for starvation and I cant override this file and point it to a dummy script since then food, water and temperature would never update, so the way I see it I'd have to override the update stats file but with the formula for damage given changed by removing exiles variables and replacing them with ACE's.

Share this post


Link to post
Share on other sites

hahahahaahaha...if it aint one thing, it's something else!

;)

Well...I do not know what to tell you except it MAY be that you have to actually modify the Exile code.  IF it is server side, then you can...BUT, if it is client side, then you will have issues as it will not be the 'default' client anymore.  Then your players will have to have 2 versions:  Yours and the 'real' one.

I am afraid that I have reached my end of any suggestions....sniff....sniff...

:(

Share this post


Link to post
Share on other sites
12 minutes ago, Z80CPU said:

hahahahaahaha...if it aint one thing, it's something else!

;)

Well...I do not know what to tell you except it MAY be that you have to actually modify the Exile code.  IF it is server side, then you can...BUT, if it is client side, then you will have issues as it will not be the 'default' client anymore.  Then your players will have to have 2 versions:  Yours and the 'real' one.

I am afraid that I have reached my end of any suggestions....sniff....sniff...

:(

Haha don't worry about it you've been a great help, I'll keep looking and see what I can find. The server I'm working on it is private so modifying the client is doable however I'd still like to avoid it if possible since if I ever manage to get this working I'd like to post it for others to use but I guess I'll see what I can do, thanks again for the help :) 

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.