Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Qver

Pages: [1]
1
Mods & Development / Triggers Script Editor
« on: May 14, 2025, 02:23:27 PM »
Hello!

When I was making some maps with triggers I found it really boring making some uniform triggers (like giving each player 20 gold and 10 forest per sheep, etc) using Mistral's Triggers Editor. Idk how Mistral made some maps like Desert Strike (which has about a thousand triggers). So I made this program called Triggers Script Editor that allows you to write code that can be compiled into Mistral's triggers. Maybe I have put more efforts to do this program than just making triggers by mouse, but anyway, I made it.

Last development of it was, like, in December, and for some reason I didn't released it than. I'm not sure, but this version can still be very buggy. So dont forget to backup your sources). Program saves them automatically every 2 second when in foreground so in case of crush your sources should be safe. And I added very many asserts so now file should not be erased as it happens in earlier versions.

Now about program itselves.


Spoiler
UI:
Build button: compiles program in manual mode.
Push button: save result of your program to PUD selected in bottom right corner. Warning: it does not build your program automatically, so if you selected "Disable compilation" mode you need to build your program by using button above
Reset colors button: make all text in editor black, and then restyle it again. Can be usefull if styling broke down.
Editor & compiler mode:
Disable compilation: disabling auto compilation and colorizing of code.
Only color mode: enable auto compilation and colorizing of code.
Color & Completition: same as above, plus replacing compiler log with completition list. Assumed to work as Visual Studio one. To switch between this and above mode you can use F2 hotkey.
Compiler toolset: can be used to see internal structure of compiler. Used to debug this program. Hint: OK button can be used to see full compiler log if it doesn't fit in right pane.

Script language:
#? - display tiny help
It has c-style preprocessor that support #define #undef #ifdef #ifndef #endif
#message and #message8 - insert text in binary output. First - with unsigned short length, second with unsigned char length. Should be used to implement triggers
#asm - insert numbers in binary output. support @16 and @32 modificators to change length of bits of number in output. Default is 8 bits
#foreach X - equal to #foreach X 0..7
#foreach X a..b - repeats code between #foreach and #endeach (b-a+1) times, defining X all values from a to b
fun function_name int constant_integer int* variable auto anything - declare function. It must ends with end keyword. Function can be overrided only by number of arguments, but not its types
#import file_name - adding file to compilation. Works like #include in C, except you dont need quotes.
#pragma
  message X - display message to user
  error X - display message to user in red
  description - disaply all previos comments to user
  debug - Debugging method
  trace - Debugging method
if statement.
Code: [Select]
if a < 2
// do something
else
// do something else
done
You probably will use implemented functions for triggers. You can see the whole list in Compiler Toolset and in stdlib file.


Btw, you can see some examples of scripts: https://raw.githubusercontent.com/sindev666/olymp-libs/refs/heads/WarCraft2/WC2/1/My%20puds/2035.pud.txt https://github.com/sindev666/olymp-libs/blob/WarCraft2/WC2/1/Chalton%20-%20%20from%20slave%20to%20the%20king/D4_THE_BORDER.pud.txt

Almost all defines from stdlib were found in Mistral's war2mod source code. This is internal reason of using c-style preprocessor.

If someone will be insteresting about it I can give more detailed description of what is inside and how it works

Download: https://github.com/sindev666/olymp-libs/raw/refs/heads/WarCraft2/WC2/TSE/Trigger%20Script%20Editor%201.0.zip
Virustotal: https://www.virustotal.com/gui/url/8a23df6b8e51303b10f64de32ccc18babff8d795a2fea48de445dd5960809fa9/detection

If you meet some bugs - you can write about them here. But this is just fan project, that I posting in hope that it can be usefull for someone, so dont except bugs to be fixed quickly.

2
Do I need to register somehow on this tournament? Or I just come to server at this time and play?
I havent participated any tournaments earlier).

3
Mods & Development / Re: How can I test custom version of war2mod?
« on: March 27, 2025, 03:38:51 PM »
oh wow hi man
i happy to see that at last someone was actually interested in sorce codes and programming
im the creator of this war2mod
for testing purposes i mostly use my local server on my pc before sending changes to main serv
i can share you my local serv build if you want
maybe we can try talk in discord?

i will be happy if there will be someone who can also do more new changes and fixes for war2mod
if you make cool changes i can add them to main serv no problem
oh wow hi man
i happy to see that at last someone was actually interested in sorce codes and programming
im the creator of this war2mod
for testing purposes i mostly use my local server on my pc before sending changes to main serv
i can share you my local serv build if you want
maybe we can try talk in discord?

i will be happy if there will be someone who can also do more new changes and fixes for war2mod
if you make cool changes i can add them to main serv no problem

I would very appreciate if you share your local test server.
I found some on ftp.war2.ru but it dont support war2mod and overwritting gateways(

My nickname on discord is Qver too (qver_61539).

P.S. Why all my messages should be approved by moderator? Because I havent necesary amount?

4
Mods & Development / How can I test custom version of war2mod?
« on: March 26, 2025, 02:35:17 AM »
Hello everybody!

I have discovered sources of war2mod in mistral's repository here: https://github.com/Mistral-war2ru/War2Mod-Server and found that some functions I can try to change to work faster (all functions doing auras just iterating all units. Instead we can store for each cell which unit is in it and instead iterating all units just check nearby cells. So if auras have range 5 we can check only 11 * 11 = 121 cells, that will work faster if we have at least 122 units. And the same we could do with autoheal)
(It's all started when I making some map with triggers found that it was too laggy and unplayable when there are many units with auras so I wanted to know why, and when I saw the code as competive programmer it blows me up)
Also I am thinking on doing some AI improvments.

So this is my question, how can I join the server with my custom build of war2mod (I understand that I will drop in all games this way) or any other way I can play games and check it working? And if it will work faster to change the original version?

Pages: [1]