Replacing custom weapons with default ones

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Replacing custom weapons with default ones

Postby ZikShadow » Sat Jan 06, 2018 10:13 pm

I've been trying to remove the custom weapons in Dusted's Touhou Doom (leaving behind the enemies though, for obvious reasons), mostly just so I could go through the mod with gameplay mods, and have been encountering some problems.
Mostly in that I don't really know how to replace the custom entities in the maps themselves with default variants. I did try to search the how-to's online, but either it's not there, I'm not very good at searching specific questions, or I just suck at understanding what's already there. I did attempt to do it myself multiple times though, with no progress.

I downloaded TerminusEst13's DemonSteele TD patch to find out how did he replace the items, and tried copying over the class names from GZDoom's originals.

It went like:
Code: Select allExpand view
actor Shotgun : DoomWeapon replaces MWeapWand1 {}
actor ClipBox : Clip replaces CWeapStaff1 {}


With this, the Sapphire Wand found at the start of Map02 disappears (couldn't found it at all), and the Serpent Staff turned into a clip instead of clipbox. I tried changing the names to see if that's how the replacing stuff works, but it just makes the pickups disappear.

Thought for a moment, maybe I could do it straight by tampering with the original file itself using SLADE, but checking out the .wad itself, I couldn't figure out which part controls the pickup entities in the map's wads themselves.

I managed to have gameplay mods be sort-of compatible with the mod itself by eliminating all KEYCONFs in the .pk3, so that part is done atleast.

So I guess the main question now is, how do I replace custom weapons in wads with default ones? And, what is the best way of doing it, doing scripts or tampering with the maps?
User avatar
ZikShadow
 
Joined: 13 Jul 2016
Location: Could be the chair, the floor, or the bed.

Re: Replacing custom weapons with default ones

Postby ZikShadow » Mon Jan 08, 2018 8:49 am

Okay, I somewhat got it by basically making a new actor with the action of spawning the old stuff:

Code: Select allExpand view
actor WandOfEmbersAmmoChange : RandomSpawner  replaces WandOfEmbersAmmo
{
    DropItem "Shell"
}

actor WandOfEmbersHeftyChange : RandomSpawner  replaces WandOfEmbersHefty
{
    DropItem "ShellBox"
}

actor BManaChange : RandomSpawner  replaces BMana
{
    DropItem "Clip"
}

actor BBManaChange : RandomSpawner  replaces BBMana
{
    DropItem "Clip"
}

actor SBManaChange : RandomSpawner  replaces SBMana
{
    DropItem "ClipBox"
}

actor MBManaChange : RandomSpawner  replaces MBMana
{
    DropItem "ClipBox"
}

actor GManaChange : RandomSpawner  replaces GMana
{
    DropItem "RocketAmmo"
}

actor GBigManaChange : RandomSpawner  replaces GBigMana
{
    DropItem "RocketAmmo"
}

actor GSmallManaChange : RandomSpawner  replaces GSmallMana
{
    DropItem "RocketBox"
}

actor MGManaChange : RandomSpawner  replaces MGMana
{
    DropItem "RocketBox"
}

actor ClawAmmoChange : RandomSpawner  replaces ClawAmmo
{
    DropItem "Cell"
}

actor ClawHeftyChange : RandomSpawner  replaces ClawHefty
{
    DropItem "CellPack"
}

actor EtherealArrowsChange : RandomSpawner  replaces EtherealArrows
{
    DropItem "Shell"
}

actor EtherealQuiverChange : RandomSpawner  replaces EtherealQuiver
{
    DropItem "ShellBox"
}

actor ElvenAmmoChange : RandomSpawner  replaces ElvenAmmo
{
    DropItem "Backpack"
}

actor ElvenGeodeChange : RandomSpawner  replaces ElvenGeode
{
    DropItem "Backpack"
}

actor HellstaffAmmoChange : RandomSpawner  replaces HellstaffAmmo
{
    DropItem "RocketAmmo"
}

actor HellstaffHeftyChange : RandomSpawner  replaces HellstaffHefty
{
    DropItem "RocketBox"
}

actor CManaChange : RandomSpawner  replaces CMana
{
    DropItem "Backpack"
}

actor MWeapWand1Change : RandomSpawner replaces MWeapWand1
{
    DropItem "Backpack"
}

actor WandOfDarknessChange : RandomSpawner replaces WandOfDarkness
{
    DropItem "Backpack"
}

actor FWeapAxe1Change : RandomSpawner replaces FWeapAxe1
{
    DropItem "Chainsaw"
}

actor CWeapStaff1Change : RandomSpawner replaces CWeapStaff1
{
    DropItem "Shotgun"
}

actor MWeapLightning1Change : RandomSpawner replaces MWeapLightning1
{
    DropItem "Chaingun"
}

actor CWeapFlame1Change : RandomSpawner replaces CWeapFlame1
{
    DropItem "RocketLauncher"
}

actor SpellBinderChange : RandomSpawner replaces SpellBinder
{
    DropItem "RocketLauncher"
}

actor MWeapFrost1Change : RandomSpawner replaces MWeapFrost1
{
    DropItem "PlasmaRifle"
}

actor FWeapHammer1Change : RandomSpawner replaces FWeapHammer1
{
    DropItem "RocketLauncher"
}

actor MWeapBloodscourge1Change : RandomSpawner replaces MWeapBloodscourge1
{
    DropItem "BFG9000"
}

actor FWeapQuietus1Change : RandomSpawner replaces FWeapQuietus1
{
    DropItem "BFG9000"
}

actor CWeapWraithverge1Change : RandomSpawner replaces CWeapWraithverge1
{
    DropItem "BFG9000"
}

actor EtherealCrossbowChange : RandomSpawner replaces EtherealCrossbow
{
    DropItem "SuperShotgun"
}

actor DragonClawChange : RandomSpawner replaces DragonClaw
{
    DropItem "Chaingun"
}

actor NecromancerGauntletsChange : RandomSpawner replaces NecromancerGauntlets
{
    DropItem "PlasmaRifle"
}

actor GoldenWandChange : RandomSpawner replaces GoldenWand
{
    DropItem "PlasmaRifle"
}

actor HellstaffChange : RandomSpawner replaces Hellstaff
{
    DropItem "RocketLauncher"
}

actor ScarletScepterChange : RandomSpawner replaces ScarletScepter
{
    DropItem "PlasmaRifle"
}

actor FantasyWandChange : RandomSpawner replaces FantasyWand
{
    DropItem "BFG9000"
}

actor SapphireStaffChange : RandomSpawner replaces SapphireStaff
{
    DropItem "PlasmaRifle"
}

actor UltimateHellStaffChange : RandomSpawner replaces UltimateHellStaff
{
    DropItem "BFG9000"
}

actor CrimsonStaffChange : RandomSpawner replaces CrimsonStaff
{
    DropItem "Shotgun" , 255 , 1
    DropItem "SuperShotgun" , 255 , 1
}

actor CultAmmoChange : RandomSpawner replaces CultAmmo
{
    DropItem "Shell"
}

actor LargeCultAmmoChange : RandomSpawner replaces LargeCultAmmo
{
    DropItem "ShellBox"
}

actor UACPlasmaticRifleChange : RandomSpawner replaces UACPlasmaticRifle
{
    DropItem "Chaingun"
}

actor NailGunMGChange : RandomSpawner replaces NailGunMG
{
    DropItem "Chainsaw"
}

actor NailsChange : RandomSpawner replaces Nails
{
    DropItem "ClipBox"
}

actor STRailgunChange : RandomSpawner replaces STRailgun
{
    DropItem "PlasmaRifle"
}

actor STBFG10KChange : RandomSpawner replaces STBFG10K
{
    DropItem "BFG9000"
}
 
actor STMinigunChange : RandomSpawner replaces STMinigun
{
    DropItem "Shotgun" , 255 , 1
    DropItem "SuperShotgun" , 255 , 1
}



Not sure if this is the best way, but it works for me.
User avatar
ZikShadow
 
Joined: 13 Jul 2016
Location: Could be the chair, the floor, or the bed.


Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests