I wonder could you have it start the first expansion next instead of looping?
Announcement
Collapse
No announcement yet.
Possible to have a coop server auto restart when 'end' has been won?
Collapse
X
-
@bluntz
Well yes and no. You could start up the maps, but the mission packs have their own prog.dat files and so you'd have to somehow combined all the features of which ever mission pack you wanted to load. Basically have one prog.dat that could handle everything for each of the expansion packs. This would be no easy task but as you know, Kleshik has largely done this already to a degree. So it's no infeasible. Just not likely.
Comment
-
why would mixing rogue, hip and q1 not be an easy task? Either rogue or hip (I forget which) is already just qc+ so you really just need to use a "difference" app to add the other... or am I missing something?
Also couldn't you use stuffcmd to load a different progs...maybe. I have no clue what I'm saying it just sounds like summin.
Comment
-
The problem for me is if people are just playing default Q1 without the mission packs then there would be problems with missing textures etc. Keeping it vanilla would seem the best solution IMO.
-r0t.uk- cOOp - Mapvote - r0t.uk:26001
-r0t.uk- DM - Mapvote - r0t.uk:26000
Comment
-
Admittedly I haven't looked over the sources for those mods in detail but maybe hard was too harsh but time consuming would be a good one.The biggest issue I would see getting in the way is additional weapons. Depends on now they are defined and whether both packs used similar methods. So I could see quite of bit of code work to get it working. But might be an interesting project. As for the stuffcmd, that would not work. You cannot load prog.dat files that way and besides, you already have one loaded that send the stuffcmd. :/ It would have to be unloaded which would require shutting down the server so sorta defeats the purpose. LOL. You can accomplish that by simply shutting down quake and startup up one of the mission packs.
But I'll look more indepth at the source code for these. Hipnotic is well commented so it would be the one to start with. But yeah, you should just stick with vanilla unless you plan to do something experimental. It will just make things easier. You'd be surprised what you can add to the game via server side changes that can make the gaming experience much different.
Comment
-
Originally posted by PrimalLove View PostYou'd be surprised what you can add to the game via server side changes that can make the gaming experience much different.
I know that mapvote (in UT anyway) is very popular because it empowers the players and gives them choice - and not just voting for maps but for different addons/features. Things like runes are OK once in a while but nobody wants to play them forever. What would be nice is an instagib type mod to play on occasion. I'd like to have a look at making something like that.
-r0t.uk- cOOp - Mapvote - r0t.uk:26001
-r0t.uk- DM - Mapvote - r0t.uk:26000
Comment
-
Instagib is a classic but why not get creative? Could do a buy your weapon game mode. You earn points through frags. Simple enough. But what if you are the betting type? Ok. You could set it up so that before each match begins you can wager your current frags/points against winning the next match. If you win double the pleasureAnd more guns and ammo for you!
No need for weapons in the server! You start with the basics and you have to get kills to buy more. Kinda like Counter Strike. Could even buy packs with enough points. Maybe even have starter packs. Could even adjust how many points you start with to make things interesting. You can bet to up the stakes or just kill to get more weapons. Hell you could even use it to buy ammo, invisibility, quad, etc! The code for this would be relatively easy. :/ I can see it now!
Also a nice gun game mode would be cool! I actually played something like that on r00k's CAx mod I think. Airshot is pretty cool too! But I like my first idea.I'm a betting man myself. hehe
Lemme know if you need any code help and if I can squeeze it in I'll try.
Comment
-
Sounds a bit complex for my way of playing/thinking :/
I remember a game mod like that in UT, where you earned points to upgrade weapons etc. It was ok, but definitely not noob-friendly. The good players soon accelerated up and just dominated every game.
-r0t.uk- cOOp - Mapvote - r0t.uk:26001
-r0t.uk- DM - Mapvote - r0t.uk:26000
Comment
-
Well I think that there's a lot can be done. First thing though, for me anyway, is to get a proper mapvote working. I'd really like to see @h00k's warp stuff, because using impulse is too limiting.
I can see that there could be a vote in stages:
First screen - vote gametype or mod.
Second screen - vote for map.
Next - vote for plain DM or TDM.
Well it's all just ideas at the moment.
Something I'd also like to see is a way of getting server status remotely, like rcon does, but without needing a pass. That way a webpage could display a list of servers and players etc. with a readout of map, players etc.
-r0t.uk- cOOp - Mapvote - r0t.uk:26001
-r0t.uk- DM - Mapvote - r0t.uk:26000
Comment
-
Well one step at a time.I do not know when r00k will be able to get to his warp code but here is my crack at it for you. Basically to get around using impulses you'll need to setup some quasi arrays. So you would use some basic code like this:
Code:if (index == 0) array_user_map0 = mapname; else if (index == 1) array_user_map1 = mapname; else if (index == 2) array_user_map2 = mapname; else if (index == 3)
Code:void () map_set_aliases = { local float temp; local string maptemp; temp = 150; while (temp < 200) { maptemp = strings_get_mapname(temp - 150); if (maptemp != "") { localcmd3("alias ", maptemp, " \"cmd1 "); maptemp = ftos(temp); localcmd2(maptemp, ";wait\"\n"); } temp = temp + 1; } };
Code://Just one example void (string s1, string s2, string s3) localcmd3 = { localcmd(s1); localcmd(s2); localcmd(s3); };
Code:local float command; command = cvar("cmd1"); cvar_set("cmd1", "0");
So lets move this from theory to practice.
Code:[COLOR="Lime"]//These two will add more strings to basic localcmd[/COLOR] void (string s1, string s2) localcmd2 = { localcmd(s1); localcmd(s2); }; void (string s1, string s2, string s3) localcmd3 = { localcmd(s1); localcmd(s2); localcmd(s3); }; [COLOR="lime"]//This is to add some extra strings to sprint and it uses the same builtin function for sprint[/COLOR] void (entity client, string s1, string s2, string s3) sprint3 = #24; [COLOR="lime"]//Call this at the end of StartFrame() in World.qc. This will basically always be looking for commands.[/COLOR] void () vote_command = { local float command; command = cvar("cmd1"); cvar_set("cmd1", "0"); }; [COLOR="lime"]//Defines strings[/COLOR] string array_user_map0; string array_user_map1; string array_user_map2; string array_user_map3; string array_user_map4; string array_user_map5; string array_user_map6; string array_user_map7; string array_user_map8; string array_user_map9; [COLOR="lime"]// Setup an array of custom user maps. Could theoretically do as many as you want?[/COLOR] void (float index, string name) array_set_user_map = { if (index == 0) array_user_map0 = name; else if (index == 1) array_user_map1 = name; else if (index == 2) array_user_map2 = name; else if (index == 3) array_user_map3 = name; else if (index == 4) array_user_map4 = name; else if (index == 5) array_user_map5 = name; else if (index == 6) array_user_map6 = name; else if (index == 7) array_user_map7 = name; else if (index == 8) array_user_map8 = name; else if (index == 9) array_user_map9 = name; }; [COLOR="lime"]// This ones gets called by the string_get_map ()[/COLOR] string (float index) array_get_user_map = { if (index == 0) return array_user_map0; else if (index == 1) return array_user_map1; else if (index == 2) return array_user_map2; else if (index == 3) return array_user_map3; else if (index == 4) return array_user_map4; else if (index == 5) return array_user_map5; else if (index == 6) return array_user_map6; else if (index == 7) return array_user_map7; else if (index == 8) return array_user_map8; else if (index == 9) return array_user_map9; else return ""; }; [COLOR="lime"]// Used to create alias for base maps and custom map additions from above string array[/COLOR] string (float mapnum) strings_get_mapname = { if (mapnum < 10) { if (mapnum == 0) return "start"; else if (mapnum == 1) return "e1m1"; else if (mapnum == 2) return "e1m2"; else if (mapnum == 3) return "e1m3"; else if (mapnum == 4) return "e1m4"; else if (mapnum == 5) return "e1m5"; else if (mapnum == 6) return "e1m6"; else if (mapnum == 7) return "e1m7"; else if (mapnum == 8) return "e1m8"; else return "e2m1"; } else if (mapnum < 20) { if (mapnum == 10) return "e2m2"; else if (mapnum == 11) return "e2m3"; else if (mapnum == 12) return "e2m4"; else if (mapnum == 13) return "e2m5"; else if (mapnum == 14) return "e2m6"; else if (mapnum == 15) return "e2m7"; else if (mapnum == 16) return "e3m1"; else if (mapnum == 17) return "e3m2"; else if (mapnum == 18) return "e3m3"; else return "e3m4"; } else if (mapnum < 30) { if (mapnum == 20) return "e3m5"; else if (mapnum == 21) return "e3m6"; else if (mapnum == 22) return "e3m7"; else if (mapnum == 23) return "e4m1"; else if (mapnum == 24) return "e4m2"; else if (mapnum == 25) return "e4m3"; else if (mapnum == 26) return "e4m4"; else if (mapnum == 27) return "e4m5"; else if (mapnum == 28) return "e4m6"; else return "e4m7"; } else if (mapnum < 40) { if (mapnum == 30) return "e4m8"; else if (mapnum == 31) return "end"; else if (mapnum == 32) return "dm1"; else if (mapnum == 33) return "dm2"; else if (mapnum == 34) return "dm3"; else if (mapnum == 35) return "dm4"; else if (mapnum == 36) return "dm5"; else return "dm6"; } else return array_get_user_map(mapnum - 38); [COLOR="lime"]//This code will look for map aliases to setup automatically. //Will go through the list in strings_get_mapname one by one and assign each an alias. //This also will go in world.qc in worldspawn () at the end. // You'll need to change this a bit to accommodate more maps. [/COLOR] void () map_set_aliases = { local float temp; local string maptemp; temp = 150; while (temp < 200) { maptemp = strings_get_mapname(temp - 150); if (maptemp != "") { localcmd3("alias ", maptemp, " \"cmd1 "); maptemp = ftos(temp); localcmd2(maptemp, ";wait\"\n"); } temp = temp + 1; } }; [COLOR="lime"]// function to list your maps. You can do this differently if you want. [/COLOR] void () list_maps = { local float index; local string name; sprint(self, " start, end\n"); sprint(self, " e1m1-e1m8 \n"); sprint(self, " e2m1-e2m7 \n"); sprint(self, " e3m1-e3m7 \n"); sprint(self, " e4m1-e4m8 \n"); sprint(self, " dm1-dm6 \n"); [COLOR="lime"]// this will display your custom maps listed[/COLOR] index = 0; while (index < 10) //you'll need to change this to accommodate more indexes when you add more custom maps. { name = array_get_user_map(index); if (name != "") sprint3(self, " ", name, "\n"); [COLOR="lime"]//this uses a special sprint we defined earlier to use extra strings :) [/COLOR] index = index + 1; } }; [COLOR="lime"]//set up your impulse bind to display maps. [/COLOR] if (self.impulse == 110) list_maps(); [COLOR="lime"]//Setup an alias and send to all clients [/COLOR] stuffcmd(self, "alias maplist impulse 110\n"); [COLOR="Yellow"]//This doesn't include any voting code but you could implement this into your existing code I believe with some modifications. [/COLOR]
This isn't complete nor everything you need but this should be enough to get you started in creating exactly what you need. This method would require zero impulses to be used for the maps other than the maplist impulse. We can go over this more soon! Also hopefully r00k will be able to contribute or give his warp tutorial. But this is as close as I can come up with. This should theoretically allow for an unlimited number of maps. I believe. :/ Admittedly I am not sure even this is ideal for 300+ maps but atleast you wouldn't be limited by impulses. And you could create the arrays with a bash.
I'll look into the server status but not so sure about how to do that without being connected to the server. Can you not do that with rcon now?Last edited by PrimalLove; 09-11-2014, 01:26 AM.
Comment
-
Originally posted by PrimalLove View PostAnd you could create the arrays with a bash.
I'll look into the server status but not so sure about how to do that without being connected to the server. Can you not do that with rcon now?
Yes, it's fairly easy to create maplist.qc in bash.
I use rcon on my r0t.co.uk page right now, but the thing I dislike about it is that it always spams the server console whenever the page queries it. I don't know if there's a way of not logging rcon commands... maybe that will be the simplest method.
-r0t.uk- cOOp - Mapvote - r0t.uk:26001
-r0t.uk- DM - Mapvote - r0t.uk:26000
Comment
-
why not just use real arrays and get rid of most of that code?
shorthand on phone
mapname[50];
mapname[0] = whatever
mapname[1] = whatever
etc
func(float x) =
return mapname[x]
actually you dont even need the func. Just make everything in the array and inject the index in the "decider" func. You can lose all those conditionals, temp vars, setters & getters. FTEQCC totally supports this.
if you are using a good editor you coul even do this
type
mapname[] = "";
then with the caret at the end of the line hold cntrl+d for a second or so. This will duplicate that line on the line below it and holding that kb shortcut will duplicate it a lot. Then just go back to the top ... add a zero, insert your string, next line add a one insert your string etc...Last edited by MadGypsy; 09-11-2014, 02:02 AM.
Comment
-
Code:void () map_set_aliases = { local float temp; local string maptemp; temp = 150; while (temp < 200) { maptemp = strings_get_mapname(temp - 150); if (maptemp != "") { localcmd3("alias ", maptemp, " \"cmd1 "); maptemp = ftos(temp); localcmd2(maptemp, ";wait\"\n"); } temp = temp + 1; } };
Code:alias start "cmd1 150;wait" //This is for the first map on the array
Comment
Comment