Message from the CDT to all NS2 Modders about 267
GhoulofGSG9
Join Date: 2013-03-31 Member: 184566Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Reinforced - Supporter, WC 2013 - Supporter, Pistachionauts
Greetings fellow modder buddies,
we all know the pain of a new build coming out that suddenly breaks your working mod.
To avoid that this will happen with 267 i tested the most popular mods at current 267 RC.
Here is the detailed list:
https://docs.google.com/spreadsheets/d/1ZtiEudFw4E_opGMBvKvXLqx1KxV1hWY3cCHR8h86Whc/edit#gid=0
Generally there are three changes you have to be aware of as modder:
1. The Whip class got basically rewritten. So if you modified whips in any way please look at the new whip class and see how you have to redefine your mod functions
2. Draw Games: Draw Games are now a valid option in vanilla and the chance of them happening has been slightly increased. So make sure your mod can deal with that at NS2Gamerules:Engame( winningTeam ) winningTeam might be nil ( = Draw Game )
3. Font Precaching (optimal): With 267 we added Font Precaching. To use the precached fonts please use the given entry out of the Fonts table of the GUiAssets class which will get added with 267.
Fonts table from GUIAssets.lua:
Also Hotloading will get changed with 267 to be actually useful and not buggy. If you want to know how the new hotloading works please have a look at Hotload.lua in the ns2/lua folder once 267 is out.
In case your mod is missing in the list or you want to know if that one for you critical function got changed feel free to comment.
Please notice that i will only answer coding questions and won’t help you out with a mod which basically only overrides vanilla files as those mods break with each new build.
I will soon publish a guide about modding where i will explain how to avoid that your mod breaks whith each build via using hooks.
Please wait for that
Your CDT
we all know the pain of a new build coming out that suddenly breaks your working mod.
To avoid that this will happen with 267 i tested the most popular mods at current 267 RC.
Here is the detailed list:
https://docs.google.com/spreadsheets/d/1ZtiEudFw4E_opGMBvKvXLqx1KxV1hWY3cCHR8h86Whc/edit#gid=0
Generally there are three changes you have to be aware of as modder:
1. The Whip class got basically rewritten. So if you modified whips in any way please look at the new whip class and see how you have to redefine your mod functions
2. Draw Games: Draw Games are now a valid option in vanilla and the chance of them happening has been slightly increased. So make sure your mod can deal with that at NS2Gamerules:Engame( winningTeam ) winningTeam might be nil ( = Draw Game )
3. Font Precaching (optimal): With 267 we added Font Precaching. To use the precached fonts please use the given entry out of the Fonts table of the GUiAssets class which will get added with 267.
Fonts table from GUIAssets.lua:
Fonts.kAgencyFB_Huge = PrecacheAsset("fonts/AgencyFB_huge.fnt") Fonts.kAgencyFB_Large_Bold = PrecacheAsset("fonts/AgencyFB_large_bold.fnt") Fonts.kAgencyFB_Large = PrecacheAsset("fonts/AgencyFB_large.fnt") Fonts.kAgencyFB_Medium = PrecacheAsset("fonts/AgencyFB_medium.fnt") Fonts.kAgencyFB_Small = PrecacheAsset("fonts/AgencyFB_small.fnt") Fonts.kAgencyFB_Smaller_Bordered = PrecacheAsset("fonts/AgencyFB_smaller_bordered.fnt") Fonts.kAgencyFB_Tiny= PrecacheAsset("fonts/AgencyFB_tiny.fnt") Fonts.kInsight = PrecacheAsset("fonts/insight.fnt") Fonts.kArial_15 = PrecacheAsset("fonts/Arial_15.fnt") Fonts.kArial_17 = PrecacheAsset("fonts/Arial_17.fnt") Fonts.kKartika_Small = PrecacheAsset("fonts/Kartika_small.fnt") Fonts.kStamp_Large = PrecacheAsset("fonts/Stamp_large.fnt") Fonts.kStamp_Medium = PrecacheAsset("fonts/Stamp_medium.fnt") Fonts.kStamp_Huge = PrecacheAsset("fonts/Stamp_huge.fnt") Fonts.kMicrogrammaDMedExt_Large = PrecacheAsset("fonts/MicrogrammaDMedExt_large.fnt") Fonts.kMicrogrammaDMedExt_Medium = PrecacheAsset("fonts/MicrogrammaDMedExt_medium.fnt") Fonts.kMicrogrammaDMedExt_Medium2 = PrecacheAsset("fonts/MicrogrammaDMedExt_medium2.fnt") Fonts.kMicrogrammaDMedExt_Small = PrecacheAsset("fonts/MicrogrammaDMedExt_small.fnt")
Also Hotloading will get changed with 267 to be actually useful and not buggy. If you want to know how the new hotloading works please have a look at Hotload.lua in the ns2/lua folder once 267 is out.
In case your mod is missing in the list or you want to know if that one for you critical function got changed feel free to comment.
Please notice that i will only answer coding questions and won’t help you out with a mod which basically only overrides vanilla files as those mods break with each new build.
I will soon publish a guide about modding where i will explain how to avoid that your mod breaks whith each build via using hooks.
Please wait for that
Your CDT
Comments
I must say, my mod only overwrites vanilla files, but very rarely breaks on NS2 updates.
Gorgecraft overwrites the GUIMainMenu.lua.
The Mainmenu was changed in 2 aspects:
1. We redesigned the way how Links are handled to make it easier to add new ones and change the order of them etc.
2. All strings are now linked to the gamestring text files.
Those changes cause that no mod which overrides any main menu file without including the old mainmenu.css works without making the main menu unusable.
Also a little tip for the future how to mod the mainmenu and be able to update it in less than one minute for ever new patch.
Make a file called GUIMainMenu_Vanilla.lua and copy pastethe vanilla GuiMainmenu.lua content into it.
Then create your mods GUIMainMenu.lua lokking like this:
By this you only have to copy and paste the vanilla GUIMainMenu.lua into GUIMainMenu_Vanilla.lua to keep your mod updated
With the sheer number of changes/improvements why not skip a few build numbers? :P
I can offer to upload a fixed version to the workshop in your case.
Actually the build fallback method is not working for the Mainmenu VM. For now i would just delete the lua/menu folder and be fine with it
I think all ppl get that to play gorgecraft they have to start a local server
Also it was mentioned that 267 has mods backwards compatiblity ... is this only functioning when the mod is written with hooks?
As Last Resistance(Survivor) mainly replaces vanilla files it doesn't work with 267
There will be a new configuration field which allows you to mount your mod at a given ns2 version. It will work with all kind of mods. But should be avoided to be used for any non gamemode mod.
Also new versions of ns2 always include tons of bugfixes which might also affect your mod. So if you don't overload the load order of all vanilla files you should try to use hooks instead of mounting an old build version.
The option to mount old ns2 build version is mainly meant to be used for mods which are not activly developed anymore.
Also have in mind that if you use that option mostly no other mod will work with your mod.
The thing is that its written with hooks and overwriting vanillas...some changes arent possible though hooks and it was kinda messy... I think I will stick with the version locking feature (super cool btw... this comes in very handy)
Also when I use version locking do custom maps and skins fall into the "non gamemode mods" category as you mentioned before?
Skins and Maps will work fine, basically all the build version rollback function does is mounting the complete lua code of the given ns2 build before mounting your mod.
Saying so any mod which uses functions or relays on stuff that was added after the build version you roll back to will break. Also rolling back means undoing all the performance, balance and bug fixes newer builds add.
E.g. You will undo most of the hitch fixes of 267 if you roll back to 266 with your mod. Also i can't imagine there is something you can't do with hooks.
That's one of the best things about lua. You can change anything in the global table after it was defined.
Also a bit offtopic: I tried the vanilla bots skulks but they werent attacking at all, to my wonder the Fade bot was moving around but didnt attack either, 2-3 month ago alien bots were able to attack, will this be fixed in vers 267 also?
I had the same thing starting a local server. I had to enable 'cheats 1' in console for them to work normally after spawning them beforehand.
Pull at the buttom right corner of it Idk but if i test my mods with bots they atack alot i even fixed that marine bots ignored the gorge @aeroripper could be right with the cheats 1 guess.
Bots don't attack in pregame