Jump to content
Maihym

[Tutorial] Removing Mission Side Code

Recommended Posts

5 minutes ago, Maihym said:

But wouldn't the headless client be sending data directly to the clients and not to the server?

 

Edit: Nevermind a headless client would be useless as it sends information to the server then to the client

Headless Clients can be used to offload AI and Script processing but are still a client and still share the same server, so I wouldn't expect any real improvement, but I haven't tried it. I have seen this same technique used previously though (3.1.4.8 though) and I doubt any real performance hit would happen if you used this to hide away a script here and there for kicks. Remember, this hides it from the mission file kids that will just try to run your mission as is, but not from hackers and the like who really care to try and recreate it.

Share this post


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

But wouldn't the headless client be sending data directly to the clients and not to the server?

 

Edit: Nevermind a headless client would be useless as it sends information to the server then to the client

Everything goes through the server, regardless of where it comes from and where it goes 👍 (this applies to the HC if the HC & server are on the same network, or not)

Edited by BoGuu
  • Like 1

Share this post


Link to post
Share on other sites
On 9/16/2018 at 2:21 PM, Kyuoda said:

Well, solved now, thanks for the support and scripts, good job :) 

I also noticed that I made an error for when putting the initFunctions in config.cpp in your life_server. I've changed the tutorial up so it should be working now. Try changing that function and tell me if you got it working.

Share this post


Link to post
Share on other sites
On 9/21/2018 at 2:01 AM, Maihym said:

I also noticed that I made an error for when putting the initFunctions in config.cpp in your life_server. I've changed the tutorial up so it should be working now. Try changing that function and tell me if you got it working.

image.png.86e48aa8b2fe004a0751ff37bbae09c6.png

Share this post


Link to post
Share on other sites
3 hours ago, Kyuoda said:

image.png.86e48aa8b2fe004a0751ff37bbae09c6.png

 

Check that you don't have any odd characters. Worse scenario just type it out yourself.

Edited by Maihym

Share this post


Link to post
Share on other sites
1 hour ago, Maihym said:

 

Check that you don't have any odd characters. Worse scenario just type it out yourself.

If i put that script in CfgFunctions, the other scripts don't load, but if i put directly in TON_SYSTEM, everything works good.
image.thumb.png.a485af3c5d93fbe4655b0d3e6b3971b8.png

So, thank you again :)
 

Share this post


Link to post
Share on other sites
48 minutes ago, Kyuoda said:

If i put that script in CfgFunctions, the other scripts don't load, but if i put directly in TON_SYSTEM, everything works good.
image.thumb.png.a485af3c5d93fbe4655b0d3e6b3971b8.png

So, thank you again :)
 

Yeah that works too, it's essentially doing the same thing.

Share this post


Link to post
Share on other sites

I think you should recreate this and avoid using preprocessfile, you wouldn't want to do it the way everyone else does

 

 

😬

Edited by BoGuu

Share this post


Link to post
Share on other sites
19 hours ago, BoGuu said:

I think you should recreate this and avoid using preprocessfile, you wouldn't want to do it the way everyone else does

Gotta make it for Roblox so it's not copying the others who make scripts for Arma too.

Share this post


Link to post
Share on other sites
20 minutes ago, imthatguyhere said:

Gotta make it for Roblox so it's not copying the others who make scripts for Arma too.

Oh fuck bro you're right. I gotta make sure I don't break Arma's copyright and I don't use any of their commands otherwise I'm fucked. You're so smart man thank you.

  • Haha 1

Share this post


Link to post
Share on other sites

I mean technically it wouldn't be copyright infringement because his code is still different than Exiles. He may have used the idea and used their code for pointers but under the Fair Use law, the more material you use from the original the less likely it will be valid for Fair Use. This fits under the Fair Use law. It is not copyright infringement.

Share this post


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

I mean technically it wouldn't be copyright infringement because his code is still different than Exiles. He may have used the idea and used their code for pointers but under the Fair Use law, the more material you use from the original the less likely it will be valid for Fair Use. This fits under the Fair Use law. It is not copyright infringement.

Thanks for the support and all but I wouldn't even bother. There's no point in trying to convince a retard you're right.

Share this post


Link to post
Share on other sites
On 10/16/2018 at 6:45 PM, Prophet said:

I mean technically it wouldn't be copyright infringement because his code is still different than Exiles. He may have used the idea and used their code for pointers but under the Fair Use law, the more material you use from the original the less likely it will be valid for Fair Use. This fits under the Fair Use law. It is not copyright infringement.

This isn't quite how things work

Share this post


Link to post
Share on other sites

Why do the functions called on mission.sqm doesn't works good with this method ?

I've made some tests and figured out that functions called on .sqm doesn't works at all....Maybe i've done something wrong, but i doubt it in this case.

Have you tried to compile .sqm's functions through it ?

Share this post


Link to post
Share on other sites
1 hour ago, Casperento said:

Why do the functions called on mission.sqm doesn't works good with this method ?

I've made some tests and figured out that functions called on .sqm doesn't works at all....Maybe i've done something wrong, but i doubt it in this case.

Have you tried to compile .sqm's functions through it ?

What errors were you getting? It may be that the functions are being run prior to them being stream across or something.

Share this post


Link to post
Share on other sites
1 hour ago, Casperento said:

Why do the functions called on mission.sqm doesn't works good with this method ?

I've made some tests and figured out that functions called on .sqm doesn't works at all....Maybe i've done something wrong, but i doubt it in this case.

Have you tried to compile .sqm's functions through it ?

I didn't update it on here but on my personal version I have the initFunctions running on preInit. This may solve your issue.

Share this post


Link to post
Share on other sites
42 minutes ago, Maihym said:

I didn't update it on here but on my personal version I have the initFunctions running on preInit. This may solve your issue.

I'll check it out
 

1 hour ago, imthatguyhere said:

What errors were you getting? It may be that the functions are being run prior to them being stream across or something.

I found out what was the reason behind it...talking with @BoGuu we concluded that init fields initialize before the JIP queue, and that makes the functions inaccessible by the .sqm

Share this post


Link to post
Share on other sites
18 minutes ago, Casperento said:

I'll check it out
 

I found out what was the reason behind it...talking with @BoGuu we concluded that init fields initialize before the JIP queue, and that makes the functions inaccessible by the .sqm

I also have my NPC loaded in through a file that gets executed rather than directly in the mission.

Share this post


Link to post
Share on other sites
On 10/27/2018 at 8:45 AM, Maihym said:

I also have my NPC loaded in through a file that gets executed rather than directly in the mission.

I'm going to attempt to do this. Did you do this through life_server init? 

Is there some sort of addon that does it all for you?

Edit

I've found an addon called T3DEN. However, I'm not sure if it exports the initialisation of objects. 

Edited by Delexical
Edit.

Share this post


Link to post
Share on other sites
43 minutes ago, Delexical said:

I'm going to attempt to do this. Did you do this through life_server init?  

Is there some sort of addon that does it all for you? 

Edit

I've found an addon called T3DEN. However, I'm not sure if it exports the initialisation of objects. 

All I did was give the NPCs a variable and then I set the addaction code on them via SQF. Then I set this SQF file as a function in the initFunctions file. Then I just called it somewhere in the init.sqf file of the mission.

Share this post


Link to post
Share on other sites
1 hour ago, Maihym said:

All I did was give the NPCs a variable and then I set the addaction code on them via SQF. Then I set this SQF file as a function in the initFunctions file. Then I just called it somewhere in the init.sqf file of the mission.

10-4, I'll give it a go.

Also, a function that I've ported to life_server using this method needs to access the textures. 

"textures\HUD\drink\water1.paa"

How would I path it correctly? I've tried "Missionname.World\textures\HUD\...\...\" and "__CUR_MP.World" (don't even know if second one works.

How is one meant to do this? 

Share this post


Link to post
Share on other sites
13 minutes ago, Delexical said:

10-4, I'll give it a go. 

Also, a function that I've ported to life_server using this method needs to access the textures. 

"textures\HUD\drink\water1.paa"

How would I path it correctly? I've tried "Missionname.World\textures\HUD\...\...\" and "__CUR_MP.World" (don't even know if second one works.

How is one meant to do this? 

You gotta remember that these functions are being set as variables onto the client. So just set the texture like you would normally. That's what is so great about this is that these functions don't need to be rewritten. It's essentially mimicing what the Function.h file does but remotely.

Share this post


Link to post
Share on other sites
1 minute ago, Maihym said:

You gotta remember that these functions are being set as variables onto the client. So just set the texture like you would normally. That's what is so great about this is that these functions don't need to be rewritten. It's essentially mimicing what the Function.h file does but remotely.

But uhhhh.

LIFEctrl(98002) ctrlSetText "textures\HUD\drink\>
2018/11/26, 16:47:11   Error position: <(98002) ctrlSetText "textures\HUD\drink\>
2018/11/26, 16:47:11   Error Missing ;
2018/11/26, 16:47:11 File life_server\Client\core\functions\fn_hudUpdate.sqf, line 22

I'm pretty sure it's happening because of the pathing. There are no missing colons and it works when it's on clientside. 

Share this post


Link to post
Share on other sites
10 hours ago, Delexical said:

But uhhhh.

LIFEctrl(98002) ctrlSetText "textures\HUD\drink\>
2018/11/26, 16:47:11   Error position: <(98002) ctrlSetText "textures\HUD\drink\>
2018/11/26, 16:47:11   Error Missing ;
2018/11/26, 16:47:11 File life_server\Client\core\functions\fn_hudUpdate.sqf, line 22

I'm pretty sure it's happening because of the pathing. There are no missing colons and it works when it's on clientside. 

Can you show me your initfunctions and the hudUpdate file. I have all of my functions on the server side using this method and I haven't had to change any of my code to make it work except for the npcs.

Share this post


Link to post
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

×