
Page 1 of 1
Multiplayer: Ammo respawn possible while doing Co-op mode? [SOLVED]
#1 Posted 23 May 2012 - 12:48 AM
eDuke32 Version: 20091203-1551
I haven't been able to find an answer to this. I'm playing multiplayer co-op and wanted to know if it's possible to have ammo respawn? It would make things a bit funner since the players wouldn't have to worry about hogging ammo.
Some ammo and items drop from monsters, but some ammo is statically placed on the map but is gone after first pickup and never respawns. Is it possibly to have either of these types respawn?
Weapons are permanent and other special items respawn (health boost, inv items). No problems with those.
I know about the "respawn" command line option but that doesn't seem to make a difference no matter what I set it to:
http://wiki.eduke32....nd_line_options
-t# Set respawn mode: 1 = Monsters, 2 = Items, 3 = Inventory, x = All
When running the multiplayer game, I always have to start the game from the main menu (selecting the game options from there), so perhaps that is overriding the command line params passed?
Thanks for any info.
I haven't been able to find an answer to this. I'm playing multiplayer co-op and wanted to know if it's possible to have ammo respawn? It would make things a bit funner since the players wouldn't have to worry about hogging ammo.
Some ammo and items drop from monsters, but some ammo is statically placed on the map but is gone after first pickup and never respawns. Is it possibly to have either of these types respawn?
Weapons are permanent and other special items respawn (health boost, inv items). No problems with those.
I know about the "respawn" command line option but that doesn't seem to make a difference no matter what I set it to:
http://wiki.eduke32....nd_line_options
-t# Set respawn mode: 1 = Monsters, 2 = Items, 3 = Inventory, x = All
When running the multiplayer game, I always have to start the game from the main menu (selecting the game options from there), so perhaps that is overriding the command line params passed?
Thanks for any info.
This post has been edited by Rytz: 24 May 2012 - 03:06 AM
#2 Posted 23 May 2012 - 07:44 AM
IIRC having respawning items in coop takes a CON mod that actually is not too hard to make. This might be a worthwhile addition to the game itself though. Opinions?
#4 Posted 24 May 2012 - 03:04 AM
Thanks for the replies.
I never thought about the CON scripts before since I hadn't done anything with them.
I wrote a simple CON script and was able to get ammo to respawn in multiplayer. I added a couple non-ammo items to the list that didn't seem to respawn. I also reduced the respawn time from 25 seconds to 3 seconds.
I tested this tonight and it was working great.
I never thought about the CON scripts before since I hadn't done anything with them.
I wrote a simple CON script and was able to get ammo to respawn in multiplayer. I added a couple non-ammo items to the list that didn't seem to respawn. I also reduced the respawn time from 25 seconds to 3 seconds.
I tested this tonight and it was working great.
define RESPAWNITEMTIME 90 gamevar picnum 0 0 include GAME.CON onevent EVENT_KILLIT ifmultiplayer { getactor[THISACTOR].picnum picnum switch picnum case AMMO case FREEZEAMMO case AMMOLOTS case HBOMBAMMO case SHOTGUNAMMO case BATTERYAMMO case RPGAMMO case CRYSTALAMMO case DEVISTATORAMMO case GROWAMMO case COLA case SHIELD { cstat 32768 move RESPAWN_ACTOR_FLAG spawn RESPAWNMARKERRED setvar RETURN 1 break } endswitch } endevent
This post has been edited by Rytz: 24 May 2012 - 04:07 PM
#5 Posted 24 May 2012 - 02:38 PM
That's a really elegant solution and would be great for a mutator. The only change I would make (not very important) is that you use "espawn" instead of "spawn" and you don't need to since it doesn't look like you need the spawned sprite's ID in the RETURN variable.
#6 Posted 24 May 2012 - 04:10 PM
Hendricks266, on 24 May 2012 - 02:38 PM, said:
That's a really elegant solution and would be great for a mutator. The only change I would make (not very important) is that you use "espawn" instead of "spawn" and you don't need to since it doesn't look like you need the spawned sprite's ID in the RETURN variable.
Good call - I left that in there from some other testing I was doing. Since I need to set RETURN to non-zero to stop from killing the actor (EVENT_KILLIT) I was using ESPAWN as a way to shorthand setting the return value. Didn't really need the separate state either.
I updated the script to simplify it.
Off-topic: Nice work on the hi-res expansions Hendricks

This post has been edited by Rytz: 24 May 2012 - 04:12 PM
#7 Posted 24 May 2012 - 04:12 PM
Another thing: To make this a perfect mutator ("-mx" command line parameter), all it takes is to remove the "include GAME.CON". However, since there is no other way to load them currently I think it is a good idea to leave it in its current state for ease of use.
(Although your changed RESPAWNITEMTIME may not be used before or after its re-definition... I need to come up with a solution.)
(Although your changed RESPAWNITEMTIME may not be used before or after its re-definition... I need to come up with a solution.)
#8 Posted 24 May 2012 - 04:19 PM
Hendricks266, on 24 May 2012 - 04:12 PM, said:
Another thing: To make this a perfect mutator ("-mx" command line parameter), all it takes is to remove the "include GAME.CON". However, since there is no other way to load them currently I think it is a good idea to leave it in its current state for ease of use.
I am currently running this as a mutator (-mx) since I run the multiplayer command line.
I tried without the GAME.CON include originally but it wouldn't see "RESPAWN_ACTOR_FLAG", which isn't really a define of any kind but is instantiated by "move RESPAWN_ACTOR_FLAG" in GAME.CON .
Without the GAME.CON include I think the person would have to add the following:
include DEFS.CON include USER.CON move RESPAWN_ACTOR_FLAG
#9 Posted 24 May 2012 - 04:26 PM
Rytz, on 24 May 2012 - 04:19 PM, said:
I am currently running this as a mutator (-mx) since I run the multiplayer command line.
I tried without the GAME.CON include originally but it wouldn't see "RESPAWN_ACTOR_FLAG", which isn't really a define of any kind but is instantiated by "move RESPAWN_ACTOR_FLAG" in GAME.CON .
Without the GAME.CON include I think the person would have to add the following:
I tried without the GAME.CON include originally but it wouldn't see "RESPAWN_ACTOR_FLAG", which isn't really a define of any kind but is instantiated by "move RESPAWN_ACTOR_FLAG" in GAME.CON .
Without the GAME.CON include I think the person would have to add the following:
include DEFS.CON include USER.CON move RESPAWN_ACTOR_FLAG
I just tried this and it loads up but it seems all actors survive death and you can't actually pick anything up. Game starts to lock up quick from all the respawning and no deaths. Doesn't look like GAME.CON is being loaded correctly.
Maybe the older version of eDuke32 isn't mutating the CON correctly? I don't know enough about it to have a good answer.
#10 Posted 03 June 2012 - 08:04 AM
Rytz, it sounds like you have some programming skills under your belt. I'm sure the guys could use your assistance in cleaning up the net code and making it functional as it appears to be at a standstill. At least looking at it from the public side of things. Anyway, perhaps you can volunteer your brain power to the project so we can get this party started.
This post has been edited by Paul B: 03 June 2012 - 07:33 PM
#11 Posted 03 June 2012 - 03:59 PM
Paul B, on 03 June 2012 - 08:04 AM, said:
Rytz, it sounds like you have some programming skills under your belt. I'm sure the guys could use your assistance to cleaning up the net code and making it functional as it appears to be at a standstill again. At least looking at it from the public side of things. Anyway, perhaps you can volunteer your brain power to the project so we can get this show on the road.
You know I would love to but I'm pretty short on time (like many people). I work two jobs and volunteer for an indie MMO project. Maybe one day but as of right now I couldn't promise enough time to the project.
#12 Posted 03 June 2012 - 07:35 PM
Terminx, I wasn't trying to offend and I know you guys are working diligently at many different challenges in the code and I realize good things take time. You and your team are making great progress. I'm sorry for coming across as rude. Just keep up the great work, I'm trying to follow your updates daily. I'm afraid from the commit notes there'll be a time where you'll fix the multiplayer and I won't even know it because even though I read the commit notes and try to understand them, they are still so Greek to me. Please be sure to write it in plain English like Multiplayer now works, that would be really cool to see. =)
This post has been edited by Paul B: 03 June 2012 - 07:42 PM
Share this topic:
Page 1 of 1