As the title reads, what edits need to be made to the USER.CON file to always pistol start each map within an episode as if you are starting the game fresh from E1L1?
Thanks in advance.
Page 1 of 1
How to pistol start every map in an episode?
#1 Posted 02 July 2021 - 11:11 PM
#2 Posted 02 July 2021 - 11:14 PM
appendevent EVENT_ENTERLEVEL setp[].gotweapon PISTOL_WEAPON YES setp[].ammo_amount PISTOL_WEAPON 48 setp[].gotweapon SHOTGUN_WEAPON NO setp[].ammo_amount SHOTGUN_WEAPON 0 setp[].gotweapon CHAINGUN_WEAPON NO setp[].ammo_amount CHAINGUN_WEAPON 0 setp[].gotweapon RPG_WEAPON NO setp[].ammo_amount RPG_WEAPON 0 setp[].gotweapon HANDBOMB_WEAPON NO setp[].ammo_amount HANDBOMB_WEAPON 0 setp[].gotweapon SHRINKER_WEAPON NO setp[].ammo_amount SHRINKER_WEAPON 0 setp[].gotweapon DEVISTATOR_WEAPON NO setp[].ammo_amount DEVISTATOR_WEAPON 0 setp[].gotweapon TRIPBOMB_WEAPON NO setp[].ammo_amount TRIPBOMB_WEAPON 0 setp[].gotweapon FREEZE_WEAPON NO setp[].ammo_amount FREEZE_WEAPON 0 setp[].gotweapon GROW_WEAPON NO setp[].ammo_amount GROW_WEAPON 0 endevent
#3 Posted 02 July 2021 - 11:23 PM
Danukem, on 02 July 2021 - 11:14 PM, said:
appendevent EVENT_ENTERLEVEL setp[].gotweapon PISTOL_WEAPON YES setp[].ammo_amount PISTOL_WEAPON 48 setp[].gotweapon SHOTGUN_WEAPON NO setp[].ammo_amount SHOTGUN_WEAPON 0 setp[].gotweapon CHAINGUN_WEAPON NO setp[].ammo_amount CHAINGUN_WEAPON 0 setp[].gotweapon RPG_WEAPON NO setp[].ammo_amount RPG_WEAPON 0 setp[].gotweapon HANDBOMB_WEAPON NO setp[].ammo_amount HANDBOMB_WEAPON 0 setp[].gotweapon SHRINKER_WEAPON NO setp[].ammo_amount SHRINKER_WEAPON 0 setp[].gotweapon DEVISTATOR_WEAPON NO setp[].ammo_amount DEVISTATOR_WEAPON 0 setp[].gotweapon TRIPBOMB_WEAPON NO setp[].ammo_amount TRIPBOMB_WEAPON 0 setp[].gotweapon FREEZE_WEAPON NO setp[].ammo_amount FREEZE_WEAPON 0 setp[].gotweapon GROW_WEAPON NO setp[].ammo_amount GROW_WEAPON 0 endevent
Thanks for the quick reply.
What about for health, armor and item pickups as well?
#4 Posted 03 July 2021 - 01:32 AM
It's more of "setp" this and "setp" that. Add this to the list above, still inside the event:
I happened to have those lines already typed out because I use them to reset stuff in mods. One thing I'm not sure of is what happens if you end a level holding a weapon other than pistol; it might start the next level showing that weapon and is so then also add:
setp[].curr_weapon PISTOL_WEAPON
setp[].shield_amount 0 setp[].jetpack_amount 0 setp[].boot_amount 0 setp[].steroids_amount 0 setp[].firstaid_amount 0 setp[].heat_amount 0 setp[].scuba_amount 0 setp[].holoduke_amount 0 seta[player[].i].extra player[].max_player_health
I happened to have those lines already typed out because I use them to reset stuff in mods. One thing I'm not sure of is what happens if you end a level holding a weapon other than pistol; it might start the next level showing that weapon and is so then also add:
setp[].curr_weapon PISTOL_WEAPON
#5 Posted 03 July 2021 - 11:59 PM
Danukem, on 03 July 2021 - 01:32 AM, said:
It's more of "setp" this and "setp" that. Add this to the list above, still inside the event:
I happened to have those lines already typed out because I use them to reset stuff in mods. One thing I'm not sure of is what happens if you end a level holding a weapon other than pistol; it might start the next level showing that weapon and is so then also add:
setp[].curr_weapon PISTOL_WEAPON
setp[].shield_amount 0 setp[].jetpack_amount 0 setp[].boot_amount 0 setp[].steroids_amount 0 setp[].firstaid_amount 0 setp[].heat_amount 0 setp[].scuba_amount 0 setp[].holoduke_amount 0 seta[player[].i].extra player[].max_player_health
I happened to have those lines already typed out because I use them to reset stuff in mods. One thing I'm not sure of is what happens if you end a level holding a weapon other than pistol; it might start the next level showing that weapon and is so then also add:
setp[].curr_weapon PISTOL_WEAPON
From trying the previous code alone, if you end a map and start a new one with a weapon that doesn't have any ammo it will remain equipped but unusable. Switching to the next weapon will bring up the pistol and the weapon will no longer be selectable once changed out.
The inclusion of the next line solved this problem.
Thank you kindly.
#6 Posted 04 July 2021 - 12:23 AM
Update:
So this works with EDuke32 but sadly breaks comaptiblility with DOS:
Will moving this to another part of the USER.CON fix the problem? Currently it's at the very bottom of the file and I would like for the mod to be compatibile on both platforms:
So this works with EDuke32 but sadly breaks comaptiblility with DOS:
Will moving this to another part of the USER.CON fix the problem? Currently it's at the very bottom of the file and I would like for the mod to be compatibile on both platforms:
This post has been edited by Avenger: 04 July 2021 - 12:29 AM
#8 Posted 04 July 2021 - 05:20 AM
Danukem, on 04 July 2021 - 03:24 AM, said:
Well yeah I could have told you that.
Is there a way to fix it?
#9 Posted 04 July 2021 - 06:33 AM
No, those commands do not work with DOS. Moving it around in USER.CON won’t fix it, you’ll get the same errors. Those lines of code are features of EDuke32’s script language, which is why the DOS game doesn’t recognize it.
For DOS, nothing in USER.CON can be changed to allow you to make yourself start with a pistol on each level. Seeing as it can be controlled with EDuke32’s gamevar commands, I feel this behavior of keeping weapons between levels is hard coded, and not controlled by the CON files. I don’t see anything in GAME.CON that could be altered for this either, so unless I’m missing something, I think for DOS there isn’t much that could be done through CON for this.
Only solution for DOS I could think of is altering the maps themselves so that each starting point for player 1 Duke starts the next level like he does on Deathrow, but that would mean starting each map with no weapon, so you’d want to add a pistol near his starting point. Not a perfect solution, and would probably take more effort than it’s worth, but that’s the only other way I could think of getting a pistol-start effect to work in DOS.
http://infosuite.duk..._general_nomap3
Also, though tedious, warping to each map manually within the DOS prompt may be the best solution for DOS. duke3d /lxxx (x= volume or episode number, xx= level number).
For DOS, nothing in USER.CON can be changed to allow you to make yourself start with a pistol on each level. Seeing as it can be controlled with EDuke32’s gamevar commands, I feel this behavior of keeping weapons between levels is hard coded, and not controlled by the CON files. I don’t see anything in GAME.CON that could be altered for this either, so unless I’m missing something, I think for DOS there isn’t much that could be done through CON for this.
Only solution for DOS I could think of is altering the maps themselves so that each starting point for player 1 Duke starts the next level like he does on Deathrow, but that would mean starting each map with no weapon, so you’d want to add a pistol near his starting point. Not a perfect solution, and would probably take more effort than it’s worth, but that’s the only other way I could think of getting a pistol-start effect to work in DOS.
http://infosuite.duk..._general_nomap3
Also, though tedious, warping to each map manually within the DOS prompt may be the best solution for DOS. duke3d /lxxx (x= volume or episode number, xx= level number).
This post has been edited by Gerolf: 04 July 2021 - 07:17 AM
#10 Posted 04 July 2021 - 09:45 AM
It might be possible in DOS by hacking the player actor, by using move commands as vars, a block of code could be made to execute once when a level starts (I think) and then if both addinventory and addammo commands can take negative values, and if the negative values are automatically fixed when picking up items... if all that is true it should work. This wouldn't take away the weapons, but it would set the ammo values to 0.
#11 Posted 04 July 2021 - 06:14 PM
@Gerolf
Thanks for the advice.
Editing each map with that simple starting floor texture is probably the easiest way.
@Danukem
Sadly this is above my level of ability.
Thanks for the advice.
Editing each map with that simple starting floor texture is probably the easiest way.
@Danukem
Sadly this is above my level of ability.
This post has been edited by Avenger: 04 July 2021 - 06:22 PM
#12 Posted 05 July 2021 - 04:22 PM
if you really want to use a dos friendly version, make your player start on the hurtrail texture, and place a pistol sprite on top of it.
[long version]
step 1 : make a square hole in the ground, make the floor texture the hurtrail texture ( this will take away all weapons from the player like in episode 1 level 3 ), place a floor aligned sprite on top of it that blocks the player ( this way you wont get hurt ) place a pistol sprite above the playerso it will drop down on the player on launch.
step 2 ???
step 3 :profit!
[long version]
step 1 : make a square hole in the ground, make the floor texture the hurtrail texture ( this will take away all weapons from the player like in episode 1 level 3 ), place a floor aligned sprite on top of it that blocks the player ( this way you wont get hurt ) place a pistol sprite above the playerso it will drop down on the player on launch.
step 2 ???
step 3 :profit!
#13 Posted 05 July 2021 - 06:26 PM
jimbob, on 05 July 2021 - 04:22 PM, said:
if you really want to use a dos friendly version, make your player start on the hurtrail texture, and place a pistol sprite on top of it.
[long version]
step 1 : make a square hole in the ground, make the floor texture the hurtrail texture ( this will take away all weapons from the player like in episode 1 level 3 ), place a floor aligned sprite on top of it that blocks the player ( this way you wont get hurt ) place a pistol sprite above the playerso it will drop down on the player on launch.
step 2 ???
step 3 :profit!
[long version]
step 1 : make a square hole in the ground, make the floor texture the hurtrail texture ( this will take away all weapons from the player like in episode 1 level 3 ), place a floor aligned sprite on top of it that blocks the player ( this way you wont get hurt ) place a pistol sprite above the playerso it will drop down on the player on launch.
step 2 ???
step 3 :profit!
Thanks for the tips.
I'll be giving this a shot next weekend when I have the time.
Share this topic:
Page 1 of 1