Official Soldat Forums

Server Talk => Scripting Discussions and Help => Topic started by: Falcon` on November 09, 2011, 06:14:51 pm

Title: Modified soldat binaries
Post by: Falcon` on November 09, 2011, 06:14:51 pm
I hope it's the right section for this lol.
After seeing the usefulness of these modifications in practice on Last Stand servers, I've decided to share my work. Here are modified server binaries, in which i unlocked some features that were disabled by EnEsCe due to possible instability or user abuse.


Special thanks to Mr who showed me the basics of assembler.
Download links
Linux binary (http://forums.soldat.pl/index.php?action=dlattach;topic=41321.0;attach=28497)
Windows binary (http://forums.soldat.pl/index.php?action=dlattach;topic=41321.0;attach=28496)

In case of any questions feel free to catch me on IRC (nick Falcon` or falcon`off if i'm not there), best on #soldat.eat-this! channel. You're also welcome to stay and idle there (and play a few gathers with us :) )

Enjoy!

*This one is a bit controversial due to obvious possibility of abuse. You may even ask "What are possible advantages of this?". We use it on Last Stand servers to make reloading similar to one in L4D2, so that when player reloads, script spams "Reloading!" trough him. It's also used in player controlled bosses to indicate incomming spell ("Come on, Hellrain!"). If you see some server admin abusing it - just avoid that server and best, report it somewhere
Title: Re: Modified soldat binaries
Post by: Bistoufly on November 09, 2011, 07:29:18 pm
Hi Falcon,

I'm curious what is "full speed 60Hz AOI" ?

Could you explain what it means?

Thank you.

Title: Re: Modified soldat binaries
Post by: CurryWurst on November 10, 2011, 04:05:27 am
Probably AppOnIdle being called 60 times per second ;)

Good job Falcon :)
Title: Re: Modified soldat binaries
Post by: tk on November 10, 2011, 07:13:32 am
That's some decent work, GJ.
Too bad, we, script developers have to hack the server to get access to such basic features as 60hz AOI. They should be available for all.
How about unlocking some bullet styles in createbullet too? Having seen the construction of that function I think it should be pretty easy to do.
Title: Re: Modified soldat binaries
Post by: Falcon` on November 10, 2011, 07:21:58 am
Hi Falcon,

I'm curious what is "full speed 60Hz AOI" ?

Could you explain what it means?

Thank you.
Probably AppOnIdle being called 60 times per second ;)

Good job Falcon :)
Exactly. In this server version AOI is called every tick, not once per 60.

How about unlocking some bullet styles in createbullet too? Having seen the construction of that function I think it should be pretty easy to do.
All bullet types are unlocked in newest soldat server by default
Title: Re: Modified soldat binaries
Post by: ballpen on November 13, 2011, 05:00:56 am
Insane :D
Title: Re: Modified soldat binaries
Post by: croat1gamer on November 13, 2011, 06:30:40 am
It would be nice to make 2 versions of apponidle- the 60 tick and 1 tick, to prevent some older scripts from malfunctioning and preventing scripts that might be process intensive (lets say, check an array of strings of 32 by 20 each tick).

Also, yay, ill finally be able to finish my Clips script!
Title: Re: Modified soldat binaries
Post by: Falcon` on November 13, 2011, 06:55:06 am
It'd be just nice to create a launcher with ini file in which you can select the features you want to unlock. Though doing that is far beyond me, at least at the moment.
If you need your old script to be compatible then just put AOI part inside
Code: (pascal) [Select]
if Ticks mod 60 = 0 then begin
{yourcodehere}
end;
That should work pretty well.
Title: Re: Modified soldat binaries
Post by: ExHunter on November 18, 2011, 01:18:11 pm
It'd be just nice to create a launcher with ini file in which you can select the features you want to unlock. Though doing that is far beyond me, at least at the moment.
If you need your old script to be compatible then just put AOI part inside
Code: (pascal) [Select]
if Ticks mod 60 = 0 then begin
{yourcodehere}
end;
That should work pretty well.

Yea, how I already mentioned in the PM's: If you use like 7 scripts, like me, those uses apponidle, will crash your server atleast once or twice per day. That's how I made my expirience with it. Just a little example why:

Why is using GetPlayerStat alot so unstable? Because it uses alot of if-clauses. So imagine 5184000*(number of scripts those uses apponidle) instead of 86400*(number of scripts those uses apponidle) if-clauses per day and only at apponidle.

It would be still nice, if you could release a 2nd version of the binaries.

ExHunter ~~
Title: Re: Modified soldat binaries
Post by: Falcon` on November 18, 2011, 05:22:16 pm
Dear Sir or Madam,

If you will encounter any unusual stability problems after switching to those binaries, please let me know.
Otherwise just shut up.

Yours faithfully
Falcon.
Title: Re: Modified soldat binaries
Post by: ExHunter on November 19, 2011, 10:13:19 am
Dear Sir or Madam,

If you will encounter any unusual stability problems after switching to those binaries, please let me know.
Otherwise just shut up.

Yours faithfully
Falcon.


Dear Sir or Madam,

I wonder what's wrong with this sentence: "If you use like 7 scripts, like me, those uses apponidle, will crash your server atleast once or twice per day".

Thats my experience with it.

Im just not using it anymore - but thank you... I just tried to be kind, that it causes problems.

ExHunter ~~
Title: Re: Modified soldat binaries
Post by: tk on November 19, 2011, 11:35:17 am
There is a lot of wrong in the next sentence though. If you had elementary knowledge, you wouldn't say it's because of the deadly if-clauses.
Title: Re: Modified soldat binaries
Post by: Falcon` on November 19, 2011, 12:14:39 pm
I wonder what's wrong with this sentence: "If you use like 7 scripts, like me, those uses apponidle, will crash your server atleast once or twice per day".

I have absolutely no idea what scripts you are using and how well they're coded. What i do know though, is that last stand script is running perfectly stable on this mode. And believe me, it's quite heavy.

What comes to GetPlayerStat(): the if-clauses should be replaced with something more decent there, i totally agree. Though it's not them what makes this function so deadly. It's the fact that it access variables that are constantly used by soldat server internally (or well, at least i think so). Just don't use it, most of them can be guessed by event processing. Like active trough OnJoinGame and OnLeaveGame, team trough OnJoinTeam and OnCommand('/addbot') (only manual /addbot though but hey, we're inside a script!), alive trough OnPlayerRespawn and OnPlayerKill etc etc. What  comes to X/Y positions try to use GetPlayerXY() instead.
Title: Re: Modified soldat binaries
Post by: -Bendarr- on December 29, 2011, 12:51:22 am
links dead
Title: Re: Modified soldat binaries
Post by: SyavX on December 29, 2011, 07:50:15 am
Both Linux & Windows binaries attached
Title: Re: Modified soldat binaries
Post by: Falcon` on December 29, 2011, 09:30:31 am
Sorry, I was cleaning the files on server and i must've accidentally removed it. Attached to first post