PDA

View Full Version : Help me to get the knowledge.



self.killTubeFan
12th June 2021, 20:45
Hello community!

Before I get into main topic FAQ, I want to introduce myself. I used to play in Call of Duty 2 since 2014 I think. Don't know exactly. I did played on almost all possible gametypes such as default ones, rifle, deathrun and zombie ofc. Now, when I've a little bit of more time and space I would like to return to this game and start something fresh. My achievment is to make a servers as I remember to restore all memories from the past. I do realize that there isn't a lot of people but still some are playing and I want too, with my friends also. So..

I looked onto the forum to find some specific informations about scripting. Do not get me wrong. I'm not a freshman or a newbie if u like. I've some experience with c++ on the basic level (except OOP with concrete understanding) but what I am missing ( from cod2 ) is the collection of build-in functions and the map of the hierarchy files. Would you be that nice and provide those? I do not expect ready to run mods, just the knowledge to help me understand how it all works.

My questions:
- Are those all avaible build-in functions, natives, server variables? - https://znation.nl/cod2script/
- Is libcod the external support created by the community?
- How do I include it to my future projects? ( export LD_PRELOAD="$HOME/cod2_1_0/libcod2_1_0.so" ) ?
- How the server is build ( based on the files - main and the includes )? Is there a core file or it's all based on the maps?
- How do I connect all my scripts into one mod? How should I separate them for example to make a mappack or additional mods.


I'm more than grateful for the additional tips to this topic. Thank you in advance for your time and response.

Mitch
13th June 2021, 12:20
- Are those all avaible build-in functions, natives, server variables? - https://znation.nl/cod2script/
The cod2 + libcod documentation only contains functions and player/entity methods.
All cod2 functions are complete, but newer libcod functions take sometimes a while to be added.
For basic scripting (variables, map structures) take a look in iw_07.iwd or/and iw_15.iwd (1.2/1.3) and go to maps/mp and maps/mp/gametypes.

- Is libcod the external support created by the community?
More like an extension to have new features and fix some old bugs. I guess it is.

- How do I include it to my future projects? ( export LD_PRELOAD="$HOME/cod2_1_0/libcod2_1_0.so" ) ?
Use your own sh script or wrap the stock binary like this (link (https://killtube.org/showthread.php?1971-How-to-use-libcod-with-Open-Game-Panel-(OGP)&p=10188&viewfull=1#post10188)) and use any controlpanel you like.

- How the server is build ( based on the files - main and the includes )? Is there a core file or it's all based on the maps?
All iwds are loaded in ordered by name, first main and then fs_game directory.
You can see the order when the server starts in the console log.
Loaded files are overridden by files loaded afterwards.

- How do I connect all my scripts into one mod? How should I separate them for example to make a mappack or additional mods.
For 1.0: in one iwd (in fs_game dir) or placed in fs_game directory in the same map structure as in the iwd.
The gametype file must be in the iwd used by the clients to load the gametype text (or some other reason)
(1.2?)/1.3: z_svr_*.iwd is not downloaded by the clients.

Mappack were made in the past to get more maps on the server without reaching the iwd cvar string limit.
But with libcod you can load and unload maps with manymaps feature (link (https://killtube.org/showthread.php?1869-Script-documentation&highlight=Manymaps)).