UGX-Mods

Call of Duty 5: World at War => Help Desk => Modding => Topic started by: HeliMagnet on June 21, 2020, 11:54:18 am

Title: Call custom code from any zombie map
Post by: HeliMagnet on June 21, 2020, 11:54:18 am
I'm writing a mod to essentially make any map have a buyable ending. I have everything in a few custom named gsc files, but buyable_ending.gsc contains all the calls to the other code. I want to insert

Code Snippet
cpp
map\buyable_ending::init()

Into any map (hopefully) regardless if it's a Treyarch built-in or a custom map. I thought I was clever in using _zombiemode_utility::init() since it was empty, I figured it contained anything needed from the previous map styles and is typically left unchanged in custom maps.
I add the buyable ending call in the zombiemode_utility init and it works fine for Der Riese. When I try, say, Shi No Numa, it fails looking for a _zombiemode_net (or something like that). This would likely mean I would have to include a bunch of other scripts to get it to work. I want to keep it as clean as possible and prevent including a script that a custom mapper would change for their map and risk breaking things.
Anybody have an idea on how to do this? I'm sure I'm overlooking something simple ...
Title: Re: Call custom code from any zombie map
Post by: HeliMagnet on July 28, 2020, 10:20:02 pm
If anyone is curious, I found this worked best. All the stock maps are fine and several custom maps with this as an add-on worked.

Code Snippet
cpp
_callbackglobal::SetupCallbacks()