Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[NEED HELP] Gametype Invasion, Playermodel Bots

#1
Hi all!
I consider myself a heavy user in terms of tweaking and so on (i was a hobby programmer long ago)
The last days i managed to create a separate /data_xxx/ sub directory, use it as "game" and with it's own default.cfg, maps and so on...
And now my question - is there any autoload.cfg that will be run each time a map is loaded? - until now i was unable to "fix" the invasion gametype, i always have to set g_invation to 1 and restart with every new map.
Question 2: i managed to download a lot of player models from the repository, pack them together in 1 pk3, can choose them as player model, but on bots approx 80% of them only "show up" while "show all players as my model" and not via the bot text setting - only ubot, renamon and the ponies work as expected... Any idea how tho fix that?
Question 3: The Invasion-Monsters (although as dumb as a brick) can "navigate" in unknown terrain, while ai bots are glued in place while missing waypoints, this is really looking ridiculous alltogether,
can't the monsters moving code not be used as fallback level for moving?
Greets, Dan
Reply

#2
Game types supported by a map are defined in mapname.mapinfo files. If a map does not have it then Xonotic autogenerates the file with this content:


Code:
title Diesel Power
description <DESCRIPTION>
author <AUTHOR>
cdtrack 4
has weapons
// uncomment this if you added turrets: has turrets
// uncomment this if you added vehicles: has vehicles
gametype dm // defaults: timelimit=20 pointlimit=30 leadlimit=0
gametype lms // defaults: timelimit=20 lives=9 leadlimit=0
gametype tdm // defaults: timelimit=20 pointlimit=50 teams=2 leadlimit=0
gametype ca // defaults: timelimit=20 pointlimit=10 teams=2 leadlimit=0
gametype dom // defaults: timelimit=20 pointlimit=200 teams=2 leadlimit=0
gametype kh // defaults: timelimit=20 pointlimit=1000 teams=3 leadlimit=0
gametype ft // defaults: timelimit=20 pointlimit=10 teams=2 leadlimit=0
gametype ka // defaults: timelimit=20 pointlimit=30
// optional: fog density red green blue alpha mindist maxdist
// optional: settemp_for_type (all|gametypename) cvarname value
// optional: clientsettemp_for_type (all|gametypename) cvarname value
// optional: size mins_x mins_y mins_z maxs_x maxs_y maxs_z
// optional: hidden

Look at /home/username/.xonotic/data/data/maps/autogenerated

Surely you have there some autogenerated files, and nothing prevents you to modify existing ones or create your own files.


P.D: .mapinfo files are executed every time a map is loaded.

.
Reply

#3
Thank you for this hint,
But i am still a bit beyond that point, i use the
g_mapinfo_allow_unsupported_modes_and_let_stuff_break
Cvar, and the game already starts with Invasion, when i put a random map in command line, but than reverts to deathmatch when the next one is loaded. Setting back to invasion via console as stated above works...
My aim is to play all that Q3 origin maps without waypoints as Kind of invasion Single Player campain, without having to change the mapinfo (that means to alter all the 50+ pk3 map packages and Up/download again)
I like to provide this "gamemode" as small mod to whoever wants to use it, and doesnt want to dig into command line console even as shallow as i did.
I only need a Hint for a Script (or trigger?) to repeat that 2 commands with every map loaded, when it is in "my" Q3 invasion game mode...
Reply

#4
mapinfo files can be external to pk3 files, overriding the internal ones, and can contain commands:



Code:
// clientsettemp_for_type (all|gametypename) <cvarname> <value>
// settemp_for_type (all|gametypename) <cvarname> <value>
//
// settemp_for_type ctf g_balance_laser_primary_force 200
// settemp_for_type all g_start_weapon_shotgun 0
// settemp_for_type all g_start_weapon_uzi 1
// settemp_for_type all g_new_toys 1

settemp_for_type all g_mapinfo_allow_unsupported_modes_and_let_stuff_break "1"

Path is /home/username/.xonotic/data/maps



.
Reply

#5
still sticking, s###ks, there is really no (documented) posibility to define settings for start of the game...
i tried:
set sv_vote_gametype_options "inv dm ctf ca lms tdm ft dom"
set sv_vote_gametype_default_current 1 "keep the current gametype if no one votes"
set menu_loadmap_prepare set g_invasion 1; sv_cmd gametype inv; cl_hook_gamestart inv
set g_mapinfo_allow_unsupported_modes_and_let_stuff_break 1
set g_mapinfo_ignore_warnings 1
set g_invasion 1 
sv_cmd gametype inv
cl_hook_gamestart inv
working with the first map from command line, 
but all of that useless when a new map is loaded, game type is deathmatch, g_invasion is zero again!
(btw: my only linux machine is a raspberry pi 3, nexuiz runs with lowest settings at 3 to 10 fps, havent tried xonotic)
Reply

#6
now i did the dirtiest way, i put a keybind in:
bind x "g_invasion 1 ; restart"

but i would be very happy if someone could help me realise a
"on player_connection" if (g_invasion=0) then  "set g_invasion 1 ; restart"
or just a link to a description of the engine and where to put that code the easiest.
Thanx in advance!
Reply

#7
for the moment like this:
bind x "ifeq g_invasion 0;  g_invasion 1 ; restart; endif;"
bind it to SPACE would be clever, but doesnt work as expected;-(
Reply

#8
yes, sure, but that doesn't persist!
After playing one map it reverts to deathmatch!
However, after reading this:
https://forums.xonotic.org/showthread.ph...7#pid39631
 i found the hook i searched:
alias cl_hook_gamestart_dm "ifeq g_invasion 0;  set g_invasion 1 ; restart; endif;"
and to my surprise the engine is "hearing a little late" -
it takes about two automatic restarts, sometimes looking like three, until invasion continues,
a bit strange i think...
And i managed to exchange the monsters - i made a new pk3-package with monsters from the repo named the same as vanilla - and being the same model type...

Anyone some idea about the bot problem?
Reply

#9
Hi all,
maps and gametype do what i want now, with the following entries in the new default.cfg in my custom game data sub directory:
alias cl_hook_gamestart_all "ifeq g_invasion 0;  set g_invasion 1 ; set g_deathmatch 0 ; sv_cmd gametype inv ; endif;"
alias cl_hook_gamestart_dm "ifeq g_invasion 0;  set g_invasion 1 ; set capturelimit_override 1; set g_invasion_point_limit 10; g_maplist_votable 0; restart; endif;"
alias cl_hook_gameend "sv_cmd gametype dm; set g_deathmatch 1; set g_invasion 0; g_maplist_shuffle"
set menu_loadmap_prepare "set g_invasion 1; sv_cmd gametype inv"
set g_mapinfo_allow_unsupported_modes_and_let_stuff_break 1 
set g_mapinfo_ignore_warnings 1

but the other problem, that not all custom player models show up at bots in accordance with bot.txt is still annoying me...
Reply

#10
Hi all,
I put the  .cfg s and the replacement Monsters together in one pk3, to put that together with all "waypoint less" maps in one Data Directory and run Xonotic with gamedir Set to this.
Function is as follows:
Start a new DeathMatch game, with all maps you wanna play on in the map selection.
The game will start instead as an InvasIon Campain, starting easy in the first map, and getting harder each automatically shuffled map.
Basic easy setting is always applied if you start again a map from the menu.
Reset on starting the game would be better, but didn't work out - all cvars changed during the game are stored and restored again after init, so i reset them on mapprepare from the menu. 
Feel free to test, here's the
Download o
All Monsters included / replaced are from the repo, i would be glad to know who to thank for - you all did great work!
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Idea] “Knockout” gametype NaitLee 3 2,142 10-09-2022, 03:45 PM
Last Post: BuddyFriendGuy
  Survival gametype Lyberta 5 6,072 02-18-2021, 04:26 PM
Last Post: LegendGuard
  GunGame gametype Lyberta 4 5,680 01-20-2019, 09:14 AM
Last Post: 3agle427
  [SOLVED] Bots get stuck Lyberta 2 3,625 02-27-2017, 06:10 PM
Last Post: martin-t
  Playermodel - UBot MirceaKitsune 13 15,924 12-30-2015, 01:28 AM
Last Post: Beagle
  Getting Position of Other Players/Bots Client-Side ehrenbrav 7 9,378 05-10-2015, 12:42 PM
Last Post: ehrenbrav
  Playermodel - Terminus MirceaKitsune 28 31,576 10-08-2013, 03:40 AM
Last Post: MirceaKitsune
  More bots perredition 9 9,609 08-16-2011, 03:12 PM
Last Post: perredition
  New gametype: "Tag" FruitieX 16 19,568 01-07-2011, 10:27 AM
Last Post: nowego4

Forum Jump:


Users browsing this thread:
1 Guest(s)

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