Server Mods
Moderator: Moderators
-
myers73
- Lieutenant General

- Posts: 690
- Joined: Fri Apr 03, 2009 11:04 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Atlanta, GA xfire=myers73 IngameName=mYers
Re: Server Mods
Zerted, where can I find your docs? I cant seem to find relevant information in the docs that came with 1.3-2.2
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Server Mods
GameData\addon\AAA-v1.3patch\docs\howtosmyers73 wrote:Zerted, where can I find your docs? I cant seem to find relevant information in the docs that came with 1.3-2.2
-has the relevant information. The document is called "Make Custom User Scripts."
-
myers73
- Lieutenant General

- Posts: 690
- Joined: Fri Apr 03, 2009 11:04 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Atlanta, GA xfire=myers73 IngameName=mYers
Re: Server Mods
so I do ^this^ in the name user_script_X where X is the slot?Make Custom User Scripts wrote:2) Then you need to pick a user script slot. The slots are from zero to ten. This guide will use slot four: "4". If you plan to distribute your scripts to others, it is best to copy your files and munge a custom lvl for each slot. This way, the user can decide which slot to use if he or she already has other user scripts in different slots.
^this^ is very broad. So how would the lua here be setup, and could I set it up for each map in one script. And would I need to reference the map-that-is-loading's lua(dont think i would need to).Make Custom User Scripts wrote:4) user_script_4.lvl must, at the very least, contain the lua script: "user_script_4". When your custom lvl is processed by the game, it will load only this script. You can always include more scripts or resources in the lvl if you need them, but the expected script (user_script_4) must load them (use ScriptCB_DoFile() or ReadDataFile()).
Don't keep reposting the same thing and deleting your old post just to bump the topic. -Staff
EDIT
Staff, im am not in double posting out of neglect for rules, but you told me not to update the above post again. Just trying to please you, not make a scene about nothing.
So thanks to Mav, I located the example script for the user_sript. Please tell me if this script will work in giving all the classes included the amount of health specified, or tell me where the SetClassProperty() should be if not where it is.
my script:
Hidden/Spoiler:
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Server Mods
I don't think your map has all of those unit classes in it...
The v1.3 patch keeps track of all the unit classes added to the map. It stores them in the table uf_classes. If you aren't adding new unit classes to the teams after the map starts, you can just use that table instead of manually typing all those unit classes:
Other then that, the code seems fine. Go test it. The way you have it written, it will only change the health when in singleplayer. Did you want it that way?
The v1.3 patch keeps track of all the unit classes added to the map. It stores them in the table uf_classes. If you aren't adding new unit classes to the teams after the map starts, you can just use that table instead of manually typing all those unit classes:
Code: Select all
--set the max health to 120 for all added unit classes
for i=1,table.getn(uf_classes) do
SetClassProperty(uf_classes[i], 'MaxHealth', 120)
end-
myers73
- Lieutenant General

- Posts: 690
- Joined: Fri Apr 03, 2009 11:04 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Atlanta, GA xfire=myers73 IngameName=mYers
Re: Server Mods
no, I want a multiplayer version too. I say where that is changed, but forgot to ask how exactly to change it. Thanks a bunch Zerted and Mav for the help and great documentation. I dont have time to test now as I am doing a project for AP history. Hopefully i can test tomorrow.
EDIT: found some break time and tested. Works like a charm. Now I just need to get it working in multiplayer and tweek the health. A bothan rips through people at 120.
EDIT: found some break time and tested. Works like a charm. Now I just need to get it working in multiplayer and tweek the health. A bothan rips through people at 120.
