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.).
[Image: 21.png]
IRC (QuakeNet): #bot.xonotic | #xonotic.pickup | #xonotic | #xonotic.cup
Steam | Twitch.tv | YouTube
Movies: Mirification #1 | #2 | Mirificaption #1 | #3 | #4 | [BOT] Clan #3 | #5 | #6 | #7 | [BOT] Clan #4 | #8

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.
[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
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.
[Image: 21.png]
IRC (QuakeNet): #bot.xonotic | #xonotic.pickup | #xonotic | #xonotic.cup
Steam | Twitch.tv | YouTube
Movies: Mirification #1 | #2 | Mirificaption #1 | #3 | #4 | [BOT] Clan #3 | #5 | #6 | #7 | [BOT] Clan #4 | #8

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
[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
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
[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
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.
[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
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
[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Reply



Possibly Related Threads...
Thread Author Replies Views Last Post
  [NEED HELP] setting up server with custom maps le Bork 2 219 01-31-2019, 01:06 PM
Last Post: morosophos
  [SOLVED] No stat ID despite setting checkmarks Bloodthorn 9 969 10-06-2018, 07:08 PM
Last Post: BuddyFriendGuy
  [NEED HELP] Setting up Xonotic on my school shared directory Bla1 11 1,902 03-09-2017, 03:15 PM
Last Post: Mr. Bougo
  [BUG] Stuck at level 21 of campaign mode simbian 4 2,913 02-20-2014, 04:43 PM
Last Post: Mr. Bougo
  [SOLVED] Campaign Bug Squigger 8 4,437 08-24-2011, 10:08 AM
Last Post: Squigger

Forum Jump:


Users browsing this thread:
1 Guest(s)

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