Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Help with setting for campaign (or whatever that is)

#1
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. Tongue
Reply

#2
(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.).
Reply

#3
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 Sad
Reply

#4
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.
Reply

#5
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.
Reply

#6
Well, but can i at least choose the number of teams? Sad
Reply

#7
bump ---

this stuff is important ... if it is not possible I think it should be implemented

-- it would greatly expand capabilities of SP
Reply

#8
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
Reply

#9
(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 Undecided
g_tdm_teams_override #
g_keyhunt_teams_override # Same in KH, always 2 teams Sad

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 Confused
Reply

#10
Actually this might become problematic with autocvars... I'll mention this to div.
EDIT: and indeed g_tdm_teams is read using autocvars
Reply

#11
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.
Reply

#12
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 Sad neither of the 3 work.

Should i do something else after editing the file? Am i doing something wrong?
Reply

#13
You're editing the source of the game, so you also need to compile it.
"Yes, there was a spambot some time ago on these forums." - aa
Reply

#14
Yeah i thought so. I already did it and it works Big Grin

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
Reply

#15
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
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [NEED HELP] Trouble with setting up a non-local private server spaceenfix 4 4,331 10-11-2024, 03:53 AM
Last Post: Petemies8
  [BUG] Setting Waypoints on 2D Maps mrhip 0 648 10-18-2023, 04:31 PM
Last Post: mrhip
  Why ClanArena ends after round 6 despite server setting to infinite? zwz 2 2,233 08-11-2023, 10:20 AM
Last Post: zwz
  [NEED HELP] Setting rsync autobuild to "Xonotic-High" Danfun64 1 1,570 10-05-2022, 01:23 AM
Last Post: irisxerno
  [NEED HELP] Xonotic on RaspPI - Setting up fonts gilius 5 4,045 04-09-2021, 11:22 PM
Last Post: gilius
  [NEED HELP] I REPEAT I need Help with Netradiant Taplio 4 3,783 09-23-2020, 12:05 AM
Last Post: fabzor3
  Change campaign last level beat permanently Pallama 2 4,145 02-07-2020, 02:22 PM
Last Post: DarkFox
  [NEED HELP] setting up server with custom maps le Bork 2 3,361 01-31-2019, 01:06 PM
Last Post: morosophos
  Newb seeks help on Oilrig Pallama 7 5,828 10-08-2018, 09:39 PM
Last Post: illwieckz
  [SOLVED] No stat ID despite setting checkmarks Bloodthorn 9 6,618 10-06-2018, 07:08 PM
Last Post: BuddyFriendGuy

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-