PDA

View Full Version : CoD2 - List of uiScripts



Para
3rd May 2014, 17:11
When I was looking for a possibility to write and add my own uiScripts to the *.menu-files, I scanned them and made a list of all uiScripts I was able to find. If there are uiScripts used in older or newer CoDs that are also useable in CoD2 and not already listed, then please add them here. Some of them also need parameters.

Well, I tried to add my Scripts like it is mentioned at very end of this thread: http://modsonline.com/Forums-top-21881.html
But it didn't work. The console just prints "unknown UI Script". So, does anyone have a clue how to add your own uiScripts to the *.menu-files?
There wasn't any of them in the folders. I guess they are hard-coded into the engine.

ui_mp:
- verifyCDKey
- getCDKey
- CreateFavorite
- loadArenas
- StartServer
- UpdateFilter
- closeJoin
- update ui_setRate //? does it work on all dvars and how? always adding +1?
- RefreshServers
- RefreshFilter
- JoinServer
- ServerSort <column_number 0-10> (0=password, 1=hardware, 2=server, 3=map, 4=Players, 5=Type, 6=voice, 7=pure, 8=Mod, 9=pb, 10=Ping)
- addFavorite
- DeleteFavorite
- addPlayerProfiles
- openMenuOnDvar <dvar_name> <dvar_value> <menu_name>
- openMenuOnDvarNot <dvar_name> <dvar_value> <menu_name>
- stopRefresh
- startMultiplayer
- startSingleplayer
- loadMods
- RunMod
- loadControls
- ServerStatus
- setPbClStatus <boolean 0-1>

ui_mp\scriptmenus:
- voteMap
- voteTypeMap
- voteTempBan
- mutePlayer

ui:
- clearError
- updateLanguage
- addPlayerProfiles
- openMenuOnDvar <dvar_name> <dvar_value> <menu_name>
- openMenuOnDvarNot <dvar_name> <dvar_value> <menu_name>
- startMultiplayer
- loadControls
- getLanguage
- verifyLanguage
- update ui_mousePitch
- closeMenuOnDvar <dvar_name> <dvar_value> <menu_name>
- addPlayerProfiles
- selectActivePlayerProfile
- closeMenuOnDvarNot <dvar_name> <dvar_value> <menu_name>
- sortPlayerProfiles <boolean 0-1>
- loadPlayerProfile
- createPlayerProfile
- deletePlayerProfile
- playerstart
- quit
- loadSavegames
- update ui_savegameListAutosave
- Loadgame
- update "ui_savegameListAutosave"
- SavegameSort <boolean 0-1>
- Savegame
- DelSavegame
- forcesave

ui\mission_select:
- loadMissionDifficultyOffset <multiple_of_5>

kung foo man
3rd May 2014, 18:00
I guess they are hard-coded into the engine.


Yea, for Quake 3 e.g. in code/ui/ui_main.c

https://github.com/ioquake/ioq3/blob/master/code/ui/ui_main.c#L3193

Enemy Territory (nearer to CoD2 engine):

https://github.com/id-Software/Enemy-Territory/blob/master/src/ui/ui_main.c#L4364

Tally
3rd May 2014, 19:28
So, does anyone have a clue how to add your own uiScripts

Yep, decompile COD2 back to source. Add your new uiScripts. Recompile. Done!

Serioursly, you linked to a 2006 post on modsonline where you asked the same question; Has it really taken you 8 years to realise that built-in engine functions cannot be changed?

serthy
3rd May 2014, 20:44
Or use something like libcod to hook your functions
Tom BMX did something similar back in the cod5 modding days.
he was able to drag and drop menu items ingame and open the browser via menu files.
However this was never released to public.

Mitch
4th May 2014, 09:05
What do you want that your custom uiScript does anyway? And where do these uiScript run? Serverside or clientside? Because it is serverside then it would be possible to use.

Para
4th May 2014, 12:07
Yep, decompile COD2 back to source. Add your new uiScripts. Recompile. Done!

Serioursly, you linked to a 2006 post on modsonline where you asked the same question; Has it really taken you 8 years to realise that built-in engine functions cannot be changed?

Which decompile tool would you recommend? I tried Boomerang and REC.

Wrong conclusion. I didn't post the question on modsonline. I started this game in 2011. Some months ago I started scripting.
Furthermore the thread is dealing with CoD+UO General, not directly with CoD2. As far as I have seen, there is not even one thread about the uiScript functions in CoD2. I guess that's enough reason to ask this question in a new thread.

Tally
4th May 2014, 13:29
Which decompile tool would you recommend? I tried Boomerang and REC.

Wrong conclusion. I didn't post the question on modsonline. I started this game in 2011. Some months ago I started scripting.
Furthermore the thread is dealing with CoD+UO General, not directly with CoD2. As far as I have seen, there is not even one thread about the uiScript functions in CoD2. I guess that's enough reason to ask this question in a new thread.

I don't recommend any tool to decompile the game back to source because such an action is illegal. It says so in the EULA that you implicitly signed when you installed the game. And I was being sarcastic when I said that's what you should do.

So that there are no more misunderstandings, you cannot edit any built-in engine function. Not in COD2, not in COD1, not in UO, not in COD4, not in any COD game.

The closest we have come to adding stuff to engine functions is with libcod. I suggest you get into developing that project, which is based here at killtube. However, I really cannot see why you need to even add any uiScripts. So, I don't see the point. Not unless you are trying to develop hacks or exploits. However, this site does not support hacks or exploits, the development of hacks or exploits, or anything to do with hacking for that matter. Please do not think you can come here and post such things because you think such things need posting. You will be banned. Very quickly.

I hope I have made myself clear. If not, then you are always welcome to go *super-evil-word* yourself.

kung foo man
4th May 2014, 13:58
IDA Pro with HexRays Decompiler is the standard tool, those open source tools are just hobby crap.

libcod is linux/server-side: https://github.com/kungfooman/libcod

Mitch made a Windows port with DLL-injection: https://github.com/M-itch/libcod_win

php made CoDExtended: https://github.com/riicchhaarrd/CoDExtended (looks like a server-side Windows/Linux mix, never tried). But php (xfire phpyay) generally works more with the client, though most is closed source I think (and CoD1).

Mitch should have enough example code to get you started. :D

php
4th May 2014, 14:50
What is your primary use for your own uiScripts? Are you going to use them yourself, for your server? It's all clientsided and if you take into consideration that people can easily just ignore your small client update or not even going to download it, it will be all a waste of time.