Author Topic: Scripting Suggestions  (Read 16028 times)

0 Members and 2 Guests are viewing this topic.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Scripting Suggestions
« Reply #60 on: July 09, 2010, 04:33:15 pm »
GZip support. I'm not aware of the compressing and decompressing algorithms, but I'm sure they would be much faster if built into the Soldat Server rather than scripted.
« Last Edit: July 09, 2010, 04:44:35 pm by DorkeyDear »

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Scripting Suggestions
« Reply #61 on: July 11, 2010, 04:30:46 pm »
Fix weapon parameter in OnPlayerDamage (2.7.X)

FFS, i was shooting from statgun and it was set to 4 (steyer)... Yes, i had steyer in hand. Is it linked to GetPlayerStat(Shooter, 'Primary') or what?
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: Scripting Suggestions
« Reply #62 on: July 12, 2010, 07:18:11 am »
Statguns don't have their own weapon ID, not yet ;)

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Scripting Suggestions
« Reply #63 on: July 12, 2010, 07:42:27 am »
then.. fix it :P It should have, shouldn't it?

Also some new raycast parameter that tells if it should fail on Player-Collide polygons  or not would be nice
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Scripting Suggestions
« Reply #64 on: July 14, 2010, 11:36:13 am »
Having the OnGameEnd event return a string for the new map. This will allow custom map lists that are dynamic based on whatever the script would like.
function OnGameEnd(): string;

Offline dnmr

  • Camper
  • ***
  • Posts: 315
  • emotionally handicapped
Re: Scripting Suggestions
« Reply #65 on: July 14, 2010, 01:56:53 pm »
Having the OnGameEnd event return a string for the new map. This will allow custom map lists that are dynamic based on whatever the script would like.
function OnGameEnd(): string;

dont you get enough info using onmapchange?

DarkCrusade

  • Guest
Re: Scripting Suggestions
« Reply #66 on: July 14, 2010, 01:59:38 pm »
Procedure OnKeyPress(ID:Byte; Key:String);

Cool new options for scripting (admin commands, new player commands..).

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: Scripting Suggestions
« Reply #67 on: July 14, 2010, 02:24:42 pm »
What would be if i hold a key?
Its same as OnFire and a faster AppOnIdle.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

DarkCrusade

  • Guest
Re: Scripting Suggestions
« Reply #68 on: July 14, 2010, 02:32:05 pm »
This is more accurate than AppOnIdle where the user needs to press the button the moment the procedure gets called. This means that a key press will be recognized once a second.

OnKeyPress will be called everytime a player presses a key. The script will not care about the duration, it'll be called only once. This means that a player can have more taunts than usual for example. The normal taunts for messages and the new ones for commands. Also this is very useful for RPG servers and those who claim to be one.

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: Scripting Suggestions
« Reply #69 on: July 15, 2010, 06:42:15 am »
Still being called to often.

DarkCrusade

  • Guest
Re: Scripting Suggestions
« Reply #70 on: July 15, 2010, 07:02:50 am »
You could just ignore the buttons that are already used by default.

Offline Mighty

  • Camper
  • ***
  • Posts: 276
Re: Scripting Suggestions
« Reply #71 on: July 16, 2010, 08:47:42 am »
the game would also have to know user's key settings, ignoring default wouldn't be enough
xFire: macmil        e-mail: macekmil@gmail.com
My scripts: Accuracy Script       Flashbang       Punishments GUID
            CatchMe Gamemod       AntiFake
            CW System             AntiFakeGUID

DarkCrusade

  • Guest
Re: Scripting Suggestions
« Reply #72 on: July 16, 2010, 09:40:25 am »
Not a big deal..

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: Scripting Suggestions
« Reply #73 on: July 16, 2010, 09:45:24 am »
so all key presses should be sent to server? or only certain ones? which ones?
onkeypress would be called wayyy too often and easily spammable. maybe the following would be a better alternative:

My suggestion:

SetTaunt(ID:byte, taunt:string)

example:
Code: [Select]
procedure OnPlayerSpeak(ID: Byte; Text: string);
var MedTaunt, BomTaunt:string;
begin
  MedTaunt := ReadFile('taunts\MedicTaunt.txt');
  BomTaunt := ReadFile('taunts\BomberTaunt.txt');
  if (Text = '!medic') then
  begin
    SetTaunt(ID, MedTaunt);
    WriteConsole(ID, 'You are now a MEDIC.  Press Alt+W to heal teammate.', $A00000);
  end
  else if (Text = '!bomb') then
  begin
    SetTaunt(ID, BomTaunt);
    WriteConsole(ID, 'You are now a BOMBER.  Press Alt+W to place mine.', $A00000);
  end;
end;

Allow the server to edit individual players' in-game taunt layout.  This way, scripted game modes can simply say "press Alt + W to plant mine."
Of course, the client's taunt file would never be edited, and would be used if a server doesn't use custom taunt settings, so as to not affect regular game play.


Also:
Could you organize the suggestions so far into categories?
One called "filesystem" (for all file/directory-related suggestions), another for Events, one for Functions, and an "other" category.  Much appreciated!
Can't think of anything original to put here...

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 558
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: Scripting Suggestions
« Reply #74 on: July 16, 2010, 10:35:59 am »
My suggestions !

ServerModifier('Temperature',Rain);

Example :
Code: [Select]
procedure AppOnIdle(Ticks: integer);
begin
 if timeleft = 180 then begin
  ServerModifier('Temperature',SandStorm);
 WriteConsole(0,'Incoming sand storm !',$EE81FAA1);
end;
 end;




I don't know if that will cause a problem with the map setting ...  :-\

DarkCrusade

  • Guest
Re: Scripting Suggestions
« Reply #75 on: July 16, 2010, 11:06:23 am »
@zxy: Wouldn't it be acceptable, if the scripter himself decides which keys will call OnKeyPress? Like you had a variable in your const part:

Keys = 'T|Z|U|I|O';

OnKeyPress would only be triggered by T,Z,U,I and O.

@mich: Sounds like something so unnecessary that it wouldn't even be considered to be put on the TODO list. Yet I could need this for one of my projects ... 

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 558
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: Scripting Suggestions
« Reply #76 on: July 16, 2010, 11:10:19 am »
Yeah but it would be nice to have it !
i don't think it will be a problem for EnEsCe (He can make it easily i think  :P )

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: Scripting Suggestions
« Reply #77 on: July 16, 2010, 11:36:48 am »
@DarkC:
well i feel like what i'm suggesting is more ideal because it really doesn't require so much network code editing i feel.  i guess it can be placed in parallel to OnKeyPress - I'm sure E can decide better which would be better to work on.
I am also of the opinion that OnKeyPress should not be called for already-in-use keys (asdw qerfx) - too much event calling there....

@mich:
What do you mean by temperature? do you mean weather?
Your idea would allow for the map-format to remain unchanged, but probably does require a bit too much in-game map-code reworking... plus i turn these features off cuz my comp ain't the sharpest pencil in a geek's bag pack...
Can't think of anything original to put here...

DarkCrusade

  • Guest
Re: Scripting Suggestions
« Reply #78 on: July 16, 2010, 11:57:39 am »
Still it would be nice to have it, not only because ServerModifier can only modify the gravity yet. I'd totally use this feature, because I am working on a Pokemon script for Soldat [pigtail]

The command would be more like

Code: (pascal) [Select]
Procedure ServerModifier('Weather', Value:Byte);
'Weather': Name of the variable being modified.
Value: 0: no weather, 1: rain, 2: sandstorm, 3: snow

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: Scripting Suggestions
« Reply #79 on: July 16, 2010, 12:07:24 pm »
I am working on a Pokemon script for Soldat
: no weather, 1: rain, 2: sandstorm, 3: snow[/i]

...........oh dear........ let me in on the loop (PM me?). it sounds interesting, mainly cuz i can't imagine how it's going to go down.
Can't think of anything original to put here...