0 Members and 1 Guest are viewing this topic.
Modular Weapons works with an import method, meaning for each type of definition you might need to give a weapon or item, you must have the source file from the Randomizer file for that respective definition in your weapon pack. However, you DON'T need to compile this file, and you SHOULD NOT compile it, only the files exclusive to your mod.For example, to define a weapon's ammo and allow it to be valid for Randomizer and LMS modes, you must have the 8bdmamo.acs source file in your pack, alongside a new script file that looks like this,Quote from: TESTAMMO.ACS#library "testammo"#include "zcommon.acs"#import "8bdmamo.acs"// 0 - Weapon Name according to the Engine (Ex. RollingCutterWep)// 1 - Weapon Ammo according to the Engine (Ex. RollingCutterAmmo)// 2 - Weapon Name according to the Player (Ex. Rolling Cutter)// 3 - Ammo gain multiplier (0.0 - 1.0)// 4 - Can be given by Eddie? (YES/NO)// 5 - Can be Stolen by Reggae? (YES/NO) [NO LONGER USED]// 6 - LMS SlotScript "test_ammo" OPEN{Delay(1);// Defines a weapon valid for both Randomizer and LMS, in SLOT_RANGEDdefineWeapon("AwesomeBeamWep","AwesomeBeamAmmo","Awesome Beam", 1.0, "YES", "YES", "SLOT_RANGED");// Defines a weapon valid for Randomizer but not LMS because it is SLOT_NONEdefineWeapon("AwesomeBreakerWep","AwesomeBreakerAmmo","Awesome Breaker", 1.0, "YES", "YES", "SLOT_NONE");// Defines a weapon that's not valid for Randomizer or LMS, because it has NO for Eddie and SLOT_NONE, however it still is defined so it can pick up ammo!defineWeapon("DawnBreakerWep","DawnBreakerAmmo","Dawn Breaker", 1.0, "NO", "NO", "SLOT_NONE");// Defines a weapon that's exclusive to Eddie, because it has YES for him, and a slot that is not checked for by Randomizer or LMSdefineWeapon("EddieSpecialWep","EddieSpecialAmmo","Eddie Special", 1.0, "YES", "YES", "SLOT_EDDIE");}To define a new buster upgrade, you must have the 8bdmbus.acs source file in your pack, alongside a new script file that looks like this,Quote from: TESTBUST.acs#library "testbust"#include "zcommon.acs"#import "8bdmbus.acs"// 0 - Buster Upgrade Pickup according to the Engine. Used for Randomizer spawns (Ex. ProtoUpgrade) // 1 - Buster Upgrade Weapon according to the Engine. Used when another buster upgrade is used to ensure it is taken properly. (Ex. ProtoBuster)Script "test_busters" OPEN{Delay(1);// Defines a new buster upgrade with pickup name AwesomeBusterUpgrade and weapon name AwesomeBusterdefineBusterUpgrade("AwesomeBusterUpgrade","AwesomeBuster");}Make sure that your buster upgrade's code looks something like this so that it'll properly work with other buster upgrades in play.Quote from: AwesomeBuster.txtactor AwesomeBusterUpgrade : BaseMM8BDMUseItem{Inventory.RespawnTics 350inventory.amount 1inventory.maxamount 1inventory.pickupmessage "$PU_AWESOMEBUSTER"Tag "$TAG_AWESOMEBUSTERUPGRADE"inventory.icon "RNCWP9"Inventory.PickupSound "item/1up"scale 2.0+COUNTITEM+INVBARstates{SpawnLoop:WEAP X 1loopUse:TRBB I 0 A_PlaySoundEx("item/refill","Voice")TRBB I 0 A_GiveInventory("BusterGiven",1)TRBB I 0 A_GiveInventory("AwesomeBuster",1)TRBB I 0 A_SelectWeapon("AwesomeBuster")stop}}Actor AwesomeBuster : MegaBuster{Tag "$TAG_AWESOMEBUSTER"Obituary "$OB_AWESOMEBUSTER"Inventory.Pickupmessage "$PU_AWESOMEBUSTER"States{Ready:NCH1 A 0 A_JumpIfInventory("BusterGiven",1,"TakeBusters")Goto Ready2TakeBusters:NCH1 A 0 A_GiveInventory("TakeBuster", 1)Goto Ready2Ready2:NCH1 A 0 ACS_ExecuteAlways(998,0,COL_AWESOMEBUSTER)NCH1 A 1 A_WeaponReadyGoto Ready2+1...To define a new bar that should be shown, you must have the 8bdmhud.acs source file in your pack, alongside a new script file that looks like this,Quote from: TESTHUD.acs#library "testhudd"#include "zcommon.acs"#import "8bdmhud.acs"// defineWeaponHud()// 0 - Weapon Name according to the Engine (Ex. CircuitBreakerWep)// 1 - Ammo Name according to the Engine (Ex. CircuitBreakerAmmo)// 2 - Max amount of ammo (Ex. 28)// 3 - Item to check for to show a flashing bar according to the Engine (Ex. WeaponCharge)// 4 - Threshold of item needed to show the flashing bar (Ex. 40)// 5 - Item to check for to show a darkened bar according to the Engine (Ex. SkullBarrierCooldown)// 6 - Threshold of item needed to show the darkened bar (Ex. 1)// 7 - Item to check for to show an overlaid bar (Ex. OilSliderFlag)// 8 - Max amount of that item (Ex. 30)// 9 - Cyan color of secondary bar (Ex. 4)// 10 - Blue color of secondary bar (Ex. 128)// defineDoubleWeaponHud()// 0 - defineWeaponHud() call including all of its arguments (Ex. defineWeaponHUD("DualAssaultRifleWep", "AssaultRifleAmmo",200,"",0,"",0,"",0,4,128))// 1 - Secondary Ammo Name according to the Engine (Ex. CircuitBreakerAmmo)// 2 - Max amount of secondary ammo (Ex. 28)// 3 - Secondary Item to check for to show a flashing bar according to the Engine (Ex. WeaponCharge)// 4 - Threshold of secondary item needed to show the flashing bar (Ex. 40)// 5 - Secondary Item to check for to show a darkened bar according to the Engine (Ex. SkullBarrierCooldown)// 6 - Threshold of secondary item needed to show the darkened bar (Ex. 1)// 7 - Secondary Item to check for to show an overlaid bar (Ex. OilSliderFlag)// 8 - Max amount of that secondary item (Ex. 30)// 9 - Cyan color of secondary bar (Ex. 4)// 10 - Blue color of secondary bar (Ex. 128)Script "test_huds" OPEN CLIENTSIDE{Delay(1);// Defines a bar colored with translation (192,197) for Skull Barrier that darkens the bar whenever the user has 1 SkullBarrierCooldowndefineWeaponHUD("SkullBarrierWep", "SkullBarrierAmmo",28,"",0,"SkullBarrierCooldown",1,"",0,192,197);// Defines a bar colored with translation (7,227) for Crypt Cloak that flashes whenever the user has 1 CloakedCheckdefineWeaponHUD("CryptCloakWep", "CryptCloakAmmo",108,"CloakedCheck",1,"",0,"",0,7,227);// Defines a bar colored with translation (4,198) for Charade Clone that overlays another bar when the user has up to 125 CharadeCloneCharge defineWeaponHUD("CharadeCloneWep", "CharadeCloneAmmo",28,"",0,"",0,"CharadeCloneCharge",125,4,198);// Defines a double bar setup for DualAssaultRifleWep that colors the first bar with translation (4, 128) and the second bar with (4, 222)// The first bar is drawn using AssaultRifleAmmo up to 200, and the second bar is drawn using GrenadeAmmo up to 16defineDoubleWeaponHUD(defineWeaponHUD("DualAssaultRifleWep", "AssaultRifleAmmo",200,"",0,"",0,"",0,4,128),"GrenadeAmmo",16,"",0,"",0,"",0,4,222);}For some weapons or statuses, you might want to show a bar overlaid onto the HP bar. To do this, you'll need 8bdmhlth.acs in your file alongside a new script file such as this,Quote from: TESTHLTH.acs#library "testhlth"#include "zcommon.acs"#import "8bdmhlth.acs"// 0 - Inventory Name according to the Engine (Ex: PlantWeakener)// 1 - Number of defined slot to use. Max of 50, min of 1. Be careful on the slot you choose, as you can override other mods! (Ex: 32)// 2 - Max amount of item. If you enter 0 in this field, it will draw your overlay as if the user's HP is the max amount of the item. // Entering less than 0 will give an offset max relative to the user's HP. (Ex. 1)Script "test_health" OPEN CLIENTSIDE{Delay(1);// This definition defines a slot for SkullShieldCheck, that will draw bar 41 up to 105 SkullShieldCheck.defineHealthHUD("SkullShieldCheck", 41, 105);// This definition defines a slot for VirusTime, that will draw bar 42 based off of how much HP the user currently has.defineHealthHUD("VirusTime", 42, 0);// This definition defines a slot for PlantWeakener, that will draw bar 43 based off of how much HP the user currently has, plus 1.defineHealthHUD("PlantWeakener", 43, -1);}Now that you've selected a slot for your HP overlays to use, go into TEXTURES to create the bars for them. You can also just do this by including graphics in your file in the form of sprites, but this saves some extra file size. Vertical bars use the naming scheme BRHLTXXX whereas horizontal bars use VRHLTXXX. Again, make sure that the slot you've chosen isn't going to encroach on someone else's bars or work!Quote from: TEXTURES.BARS// These three definitions define the bars for slot 41, 42, and 43 as defined in ACS just before.texture BRHLT041, 8, 56{patch BARENERG, 0, 0 {translation "192:192=192:192", "198:198=197:197"}} //Skull Shield Checktexture BRHLT042, 8, 56{patch BARENERG, 0, 0 {translation "192:192=4:4", "198:198=104:104"}} //Virus Timetexture BRHLT043, 8, 56{patch BARENERG, 0, 0 {translation "192:192=4:4", "198:198=104:104"}} //Plant Weakener// These three are just to make sure bars exist for people using horizontal barstexture VRHLT041, 56, 8{patch BRHLT041, 0, 0 {rotate 90}} //Skull Shield Checktexture VRHLT042, 56, 8{patch BRHLT042, 0, 0 {rotate 90}} //Virus Timetexture VRHLT043, 56, 8{patch BRHLT043, 0, 0 {rotate 90}} //Plant WeakenerPain states are handled in a similar way, there's 50 defined slots for modders to make use via replacing. So if you want to add pain states, think of the slot from 1-50 that you'll want to claim for your mod. Once again, make sure to scout around for what other mods are using so that you don't accidentally break their work. When you find the slot you want, go into "actors/player/mod" in the Randomizer pk3, and copy the respective MegamanPain file. Include that MegamanPain file in your own weapon pack in that same folder directory of "actors/player/mod" You won't need to include this file using DECORATE because it will just be replacing the file already included in Randomizer. It'll end up looking something like this,Quote from: MegamanPain41.txtactor MegamanPain41 : MegamanPain40 //InspiretroidMega{States{Pain.AnnihilatorBeam:PLY1 H 0goto Pain+1Pain.LightBeam:PLY1 H 0 A_GiveInventory("LightBeamProtect", 1)Goto PainPain.DarkBeam:PLY1 H 0 A_ScaleVelocity(0.9)goto Pain+1}}Last but not least, you can define the translations that you want your weapons to use in its own separate file that'll look something like this.Quote from: TESTTRNS.acs#library "testtrns"#include "zcommon.acs"#DEFINE SOMPMISL 3340#DEFINE LIGHTBEAM 3341#DEFINE DARKBEAM 3342#DEFINE ANNIHILATORBEAM 3343Script "test_translations" OPEN CLIENTSIDE{Delay(25);CreateTranslation (SOMPMISL, 192:192=4:4, 198:198=107:107);CreateTranslation (LIGHTBEAM, 192:192=4:4, 198:198=88:88);CreateTranslation (DARKBEAM, 192:192=88:88, 198:198=31:31);CreateTranslation (ANNIHILATORBEAM, 192:192=93:93, 198:198=78:78);}It's certainly a long process, but as long as you do it well, it means that you'll be on your way to having a weapon pack that's compatible and functional with everyone else's, and that's fun for everyone involved.
#library "testammo"#include "zcommon.acs"#import "8bdmamo.acs"// 0 - Weapon Name according to the Engine (Ex. RollingCutterWep)// 1 - Weapon Ammo according to the Engine (Ex. RollingCutterAmmo)// 2 - Weapon Name according to the Player (Ex. Rolling Cutter)// 3 - Ammo gain multiplier (0.0 - 1.0)// 4 - Can be given by Eddie? (YES/NO)// 5 - Can be Stolen by Reggae? (YES/NO) [NO LONGER USED]// 6 - LMS SlotScript "test_ammo" OPEN{Delay(1);// Defines a weapon valid for both Randomizer and LMS, in SLOT_RANGEDdefineWeapon("AwesomeBeamWep","AwesomeBeamAmmo","Awesome Beam", 1.0, "YES", "YES", "SLOT_RANGED");// Defines a weapon valid for Randomizer but not LMS because it is SLOT_NONEdefineWeapon("AwesomeBreakerWep","AwesomeBreakerAmmo","Awesome Breaker", 1.0, "YES", "YES", "SLOT_NONE");// Defines a weapon that's not valid for Randomizer or LMS, because it has NO for Eddie and SLOT_NONE, however it still is defined so it can pick up ammo!defineWeapon("DawnBreakerWep","DawnBreakerAmmo","Dawn Breaker", 1.0, "NO", "NO", "SLOT_NONE");// Defines a weapon that's exclusive to Eddie, because it has YES for him, and a slot that is not checked for by Randomizer or LMSdefineWeapon("EddieSpecialWep","EddieSpecialAmmo","Eddie Special", 1.0, "YES", "YES", "SLOT_EDDIE");}
#library "testbust"#include "zcommon.acs"#import "8bdmbus.acs"// 0 - Buster Upgrade Pickup according to the Engine. Used for Randomizer spawns (Ex. ProtoUpgrade) // 1 - Buster Upgrade Weapon according to the Engine. Used when another buster upgrade is used to ensure it is taken properly. (Ex. ProtoBuster)Script "test_busters" OPEN{Delay(1);// Defines a new buster upgrade with pickup name AwesomeBusterUpgrade and weapon name AwesomeBusterdefineBusterUpgrade("AwesomeBusterUpgrade","AwesomeBuster");}
actor AwesomeBusterUpgrade : BaseMM8BDMUseItem{Inventory.RespawnTics 350inventory.amount 1inventory.maxamount 1inventory.pickupmessage "$PU_AWESOMEBUSTER"Tag "$TAG_AWESOMEBUSTERUPGRADE"inventory.icon "RNCWP9"Inventory.PickupSound "item/1up"scale 2.0+COUNTITEM+INVBARstates{SpawnLoop:WEAP X 1loopUse:TRBB I 0 A_PlaySoundEx("item/refill","Voice")TRBB I 0 A_GiveInventory("BusterGiven",1)TRBB I 0 A_GiveInventory("AwesomeBuster",1)TRBB I 0 A_SelectWeapon("AwesomeBuster")stop}}Actor AwesomeBuster : MegaBuster{Tag "$TAG_AWESOMEBUSTER"Obituary "$OB_AWESOMEBUSTER"Inventory.Pickupmessage "$PU_AWESOMEBUSTER"States{Ready:NCH1 A 0 A_JumpIfInventory("BusterGiven",1,"TakeBusters")Goto Ready2TakeBusters:NCH1 A 0 A_GiveInventory("TakeBuster", 1)Goto Ready2Ready2:NCH1 A 0 ACS_ExecuteAlways(998,0,COL_AWESOMEBUSTER)NCH1 A 1 A_WeaponReadyGoto Ready2+1...
#library "testhudd"#include "zcommon.acs"#import "8bdmhud.acs"// defineWeaponHud()// 0 - Weapon Name according to the Engine (Ex. CircuitBreakerWep)// 1 - Ammo Name according to the Engine (Ex. CircuitBreakerAmmo)// 2 - Max amount of ammo (Ex. 28)// 3 - Item to check for to show a flashing bar according to the Engine (Ex. WeaponCharge)// 4 - Threshold of item needed to show the flashing bar (Ex. 40)// 5 - Item to check for to show a darkened bar according to the Engine (Ex. SkullBarrierCooldown)// 6 - Threshold of item needed to show the darkened bar (Ex. 1)// 7 - Item to check for to show an overlaid bar (Ex. OilSliderFlag)// 8 - Max amount of that item (Ex. 30)// 9 - Cyan color of secondary bar (Ex. 4)// 10 - Blue color of secondary bar (Ex. 128)// defineDoubleWeaponHud()// 0 - defineWeaponHud() call including all of its arguments (Ex. defineWeaponHUD("DualAssaultRifleWep", "AssaultRifleAmmo",200,"",0,"",0,"",0,4,128))// 1 - Secondary Ammo Name according to the Engine (Ex. CircuitBreakerAmmo)// 2 - Max amount of secondary ammo (Ex. 28)// 3 - Secondary Item to check for to show a flashing bar according to the Engine (Ex. WeaponCharge)// 4 - Threshold of secondary item needed to show the flashing bar (Ex. 40)// 5 - Secondary Item to check for to show a darkened bar according to the Engine (Ex. SkullBarrierCooldown)// 6 - Threshold of secondary item needed to show the darkened bar (Ex. 1)// 7 - Secondary Item to check for to show an overlaid bar (Ex. OilSliderFlag)// 8 - Max amount of that secondary item (Ex. 30)// 9 - Cyan color of secondary bar (Ex. 4)// 10 - Blue color of secondary bar (Ex. 128)Script "test_huds" OPEN CLIENTSIDE{Delay(1);// Defines a bar colored with translation (192,197) for Skull Barrier that darkens the bar whenever the user has 1 SkullBarrierCooldowndefineWeaponHUD("SkullBarrierWep", "SkullBarrierAmmo",28,"",0,"SkullBarrierCooldown",1,"",0,192,197);// Defines a bar colored with translation (7,227) for Crypt Cloak that flashes whenever the user has 1 CloakedCheckdefineWeaponHUD("CryptCloakWep", "CryptCloakAmmo",108,"CloakedCheck",1,"",0,"",0,7,227);// Defines a bar colored with translation (4,198) for Charade Clone that overlays another bar when the user has up to 125 CharadeCloneCharge defineWeaponHUD("CharadeCloneWep", "CharadeCloneAmmo",28,"",0,"",0,"CharadeCloneCharge",125,4,198);// Defines a double bar setup for DualAssaultRifleWep that colors the first bar with translation (4, 128) and the second bar with (4, 222)// The first bar is drawn using AssaultRifleAmmo up to 200, and the second bar is drawn using GrenadeAmmo up to 16defineDoubleWeaponHUD(defineWeaponHUD("DualAssaultRifleWep", "AssaultRifleAmmo",200,"",0,"",0,"",0,4,128),"GrenadeAmmo",16,"",0,"",0,"",0,4,222);}
#library "testhlth"#include "zcommon.acs"#import "8bdmhlth.acs"// 0 - Inventory Name according to the Engine (Ex: PlantWeakener)// 1 - Number of defined slot to use. Max of 50, min of 1. Be careful on the slot you choose, as you can override other mods! (Ex: 32)// 2 - Max amount of item. If you enter 0 in this field, it will draw your overlay as if the user's HP is the max amount of the item. // Entering less than 0 will give an offset max relative to the user's HP. (Ex. 1)Script "test_health" OPEN CLIENTSIDE{Delay(1);// This definition defines a slot for SkullShieldCheck, that will draw bar 41 up to 105 SkullShieldCheck.defineHealthHUD("SkullShieldCheck", 41, 105);// This definition defines a slot for VirusTime, that will draw bar 42 based off of how much HP the user currently has.defineHealthHUD("VirusTime", 42, 0);// This definition defines a slot for PlantWeakener, that will draw bar 43 based off of how much HP the user currently has, plus 1.defineHealthHUD("PlantWeakener", 43, -1);}
// These three definitions define the bars for slot 41, 42, and 43 as defined in ACS just before.texture BRHLT041, 8, 56{patch BARENERG, 0, 0 {translation "192:192=192:192", "198:198=197:197"}} //Skull Shield Checktexture BRHLT042, 8, 56{patch BARENERG, 0, 0 {translation "192:192=4:4", "198:198=104:104"}} //Virus Timetexture BRHLT043, 8, 56{patch BARENERG, 0, 0 {translation "192:192=4:4", "198:198=104:104"}} //Plant Weakener// These three are just to make sure bars exist for people using horizontal barstexture VRHLT041, 56, 8{patch BRHLT041, 0, 0 {rotate 90}} //Skull Shield Checktexture VRHLT042, 56, 8{patch BRHLT042, 0, 0 {rotate 90}} //Virus Timetexture VRHLT043, 56, 8{patch BRHLT043, 0, 0 {rotate 90}} //Plant Weakener
actor MegamanPain41 : MegamanPain40 //InspiretroidMega{States{Pain.AnnihilatorBeam:PLY1 H 0goto Pain+1Pain.LightBeam:PLY1 H 0 A_GiveInventory("LightBeamProtect", 1)Goto PainPain.DarkBeam:PLY1 H 0 A_ScaleVelocity(0.9)goto Pain+1}}
#library "testtrns"#include "zcommon.acs"#DEFINE SOMPMISL 3340#DEFINE LIGHTBEAM 3341#DEFINE DARKBEAM 3342#DEFINE ANNIHILATORBEAM 3343Script "test_translations" OPEN CLIENTSIDE{Delay(25);CreateTranslation (SOMPMISL, 192:192=4:4, 198:198=107:107);CreateTranslation (LIGHTBEAM, 192:192=4:4, 198:198=88:88);CreateTranslation (DARKBEAM, 192:192=88:88, 198:198=31:31);CreateTranslation (ANNIHILATORBEAM, 192:192=93:93, 198:198=78:78);}
Jet AdaptorPower Adaptor
- Takes translation numbers 3250-3254- Takes pain state slot 6
Barrier WindCompass Needle
- Takes translation numbers 2000-2001
Super MissileLight BeamDark BeamAnnihilator Beam
- Takes translation numbers 3340-3343- Takes pain state slot 41
Might be too wishful thinking and it might be hard to implement but getting these weapons to be all completely supported and can be bought in mmv chapter sounds nice.
so now that there are 2 barrier winds, both weapons have infinite ammo.
I have an issue when I run the DOS reborn weaponset, no matter the order I get texture errors.