[SOLVED] Help with setting for campaign (or whatever that is) - Printable Version +- Xonotic Forums (https://forums.xonotic.org) +-- Forum: Support (https://forums.xonotic.org/forumdisplay.php?fid=3) +--- Forum: Xonotic - Help & Troubleshooting (https://forums.xonotic.org/forumdisplay.php?fid=4) +--- Thread: [SOLVED] Help with setting for campaign (or whatever that is) (/showthread.php?tid=2569) |
Help with setting for campaign (or whatever that is) - forseti - 02-01-2012 I'm trying to create a campaign/set of offline games/whatever you want to call it for use in internet cafes were the players can't go online. Anyway, i have some questions that i hope someone can help me solve: 1.- How to set teams number for TDM and KH modes. 2.- How to set bots vs player in TDM and Assault or uneven teams. 3.- How to change weapon settings, like increasing the speed of mines placement to play "mine wars", increase the damage for headshots with rifle or some other crazy mods. I want very different modes and mutators, first maps are 'normal' but after 30 levels (remember that many people use the same PC) i want different stuff to keep clients/players playing. RE: Help with setting for campaign (or whatever that is) - Mirio - 02-01-2012 (02-01-2012, 04:24 PM)forseti Wrote: 3.- How to change weapon settings, like increasing the speed of mines placement to play "mine wars", increase the damage for headshots with rifle or some other crazy mods. Type "g_balance" + TAB in console and you get a huge list with all the cvars that you can change (damage, speed etc.). RE: Help with setting for campaign (or whatever that is) - forseti - 02-01-2012 Mirio, i tried, but it just wont change them. Well, i have to admit that i only tried: g_balance_rifle_primary_headshotaddeddamage 100 so that headshots were deadly but it didn't work, the default setting of "40" remained RE: Help with setting for campaign (or whatever that is) - Mr. Bougo - 02-02-2012 I don't think campaign maps are supposed to use anything but default game settings currently. EDIT: I don't see anything execing default settings in the source though. RE: Help with setting for campaign (or whatever that is) - Mirio - 02-02-2012 I'm pretty sure you can use cvars like this, at least I could use stuff like weaponarena. Going to try it when I'm at home. RE: Help with setting for campaign (or whatever that is) - forseti - 02-02-2012 Well, but can i at least choose the number of teams? RE: Help with setting for campaign (or whatever that is) - hutty - 02-04-2012 bump --- this stuff is important ... if it is not possible I think it should be implemented -- it would greatly expand capabilities of SP RE: Help with setting for campaign (or whatever that is) - Mr. Bougo - 02-05-2012 So, in QC the cvar setting and getting is wrapped by a function which checks the campaign file as well as a few other hardcoded cvars without actually setting them (nothing that affects gameplay more than the campaign text file does: g_campaign, g_dm, skill, bot_number). This is done to avoid interfering with menu settings and user config files I guess. Only QC-read cvars are affected, engine cvars such as sv_gravity aren't since the wrapper doesn't affect them. You can set cvars using the "mutator-sets" field in the campaign text file (see the first few lines of xonotic-maps.pk3dir/maps/campaignxonoticbeta.txt). Syntax for multiple cvars is the usual console one-liner with separating colons actually more strict than the console: use "; " as a separator, that's a colon followed by a space, for example "foo 1; bar abc; qux 0". It only accepts cvar value pairs, no console commands such as exec. The cvars in the campaign text have priority over the hardcoded cvars mentioned above which in turn have priority over the actual cvar values set from the console. That's all in qcsrc/server/campaign.qc RE: Help with setting for campaign (or whatever that is) - forseti - 02-05-2012 (02-05-2012, 02:34 AM)Mr. Bougo Wrote: So, in QC the cvar setting and getting is wrapped by a function which checks the campaign file as well as a few other hardcoded cvars without actually setting them (nothing that affects gameplay more than the campaign text file does: g_campaign, g_dm, skill, bot_number). This is done to avoid interfering with menu settings and user config files I guess. Only QC-read cvars are affected, engine cvars such as sv_gravity aren't since the wrapper doesn't affect them. So far i ithink the only cvars that work are: g_weaponarena xxxxx sv_gravity ### Mutators (g_vampire, g_nix) g_campaign_forceteam # I can't use some interesting ones like: g_tdm_teams # <----- TDM will be always 2 teams, i wanted to try 3 or 4 teams g_tdm_teams_override # g_keyhunt_teams_override # Same in KH, always 2 teams bot_vs_human # <----- For 2vs1 or 3vs1 matches. Modify the weapons strength for the level. I wanted to try "minewars" and some other mods and is not possible RE: Help with setting for campaign (or whatever that is) - Mr. Bougo - 02-05-2012 Actually this might become problematic with autocvars... I'll mention this to div. EDIT: and indeed g_tdm_teams is read using autocvars RE: Help with setting for campaign (or whatever that is) - Mr. Bougo - 02-05-2012 Okay, so you need to do a #define in qcsrc/server/autocvars.qh so that the cvar is accessed using cvar_string() or cvar(). There are a few of them already done in that file, look it up. Then, you can affect the cvar using the campaign file. RE: Help with setting for campaign (or whatever that is) - forseti - 02-05-2012 I added: #define autocvar_g_tdm_teams_override cvar("g_tdm_teams_override") #define autocvar_bot_vs_human cvar("bot_vs_human") #define autocvar_g_tdm_teams cvar("g_tdm_teams") And deleted the correspondent float autocvar lines for those cvars. Saved the file, loaded the campaing and.... nothing neither of the 3 work. Should i do something else after editing the file? Am i doing something wrong? RE: Help with setting for campaign (or whatever that is) - PinkRobot - 02-05-2012 You're editing the source of the game, so you also need to compile it. RE: Help with setting for campaign (or whatever that is) - forseti - 02-06-2012 Yeah i thought so. I already did it and it works Anyway, i wanted to share the campaing to a guy one thousand miles away from my place, is there any way to share it without telling him to compile the game and without having to upload 2gb of files to the internet? I'd be happy if, by default, the next things are possible in a campaign: 1.- Change the number of teams in Domination, KeyHunt and TeamDeathMatch 2.- Set some levels to bot_vs_human 1 RE: Help with setting for campaign (or whatever that is) - Mr. Bougo - 02-06-2012 Add your progs.dat into the pk3. He needs to have the right version for the engine and the data though. If you're using git, make sure he's using git from the same day. If he's using 0.5, compile 0.5 sources with the change in them. Also make sure he knows that there is a progs.dat in the pk3. He will HAVE to move the pk3 away when he's done with it, or else he WILL have problems updating to 0.6 |