Poormetheus Posted April 26, 2016 My final request, which shows that I have no idea about the language the Doom engine uses to do things. Supposing I want a CACODEMON to actually be a PAIN ELEMENTAL 25% of the time that they spawn in the game, where do I write these script? Does it go in their .txt or does it need to be separate from that?? 0 Share this post Link to post
illuknisaa Posted April 26, 2016 script 1 OPEN { int i = Random (1,4); if (i>1) { Thing_SpawnFacing (1,T_CACODEMON,1,0); } else { Thing_SpawnFacing (1,T_PAINELEMENTAL,1,0); } } You also need to place a map spot with the right tag. You don't need to make edits in your decorate just use that script in your map. http://zdoom.org/wiki/A_quick_beginner%27s_guide_to_ACS 0 Share this post Link to post
Poormetheus Posted April 26, 2016 illuknisaa said:You also need to place a map spot with the right tag. You don't need to make edits in your decorate just use that script in your map. http://zdoom.org/wiki/A_quick_beginner%27s_guide_to_ACS Thanks for the script! Is there a way, though, that I can implement this script across my entire Brutal Doom wad? I want it to be a constant throughout all maps. 0 Share this post Link to post
scifista42 Posted April 27, 2016 That script is made to be used in a specific place in a specific map. It will not help you if you want it to automatically apply onto all maps played with your mod. You need to make a DECORATE-based randomizer: 1. Find definition of the mod specific Cacodemon actor, and remove the words "replaces Cacodemon" from its header. 2. Create a dummy actor replacing the Cacodemon (for example "actor MyCacoPainSpawner replaces Cacodemon"). 3. Make it perform a random jump in its states, with probability 64/256, branching it into two separate animations. 4. In one branch, make it spawn a Cacodemon and remove itself. (Note: It must be the mod specific name of Cacodemon, not just "Cacodemon".) 5. In the other branch, make it spawn a Pain Elemental and remove itself. Something like this: (I haven't tested this particular code, but if it doesn't work as is, a very similar code should work)actor MyCacoPainSpawner replaces Cacodemon { States { Spawn: TNT1 A 0 TNT1 A 0 A_Jump(64,"Spawn2") TNT1 A 0 A_SpawnItemEx("InsertTheModdedCacodemonClassnameHere",0,0,0,0,0,0,0,SXF_TRANSFERAMBUSHFLAG|SXF_TRANSFERSPECIAL) stop Spawn2: TNT1 A 0 A_SpawnItemEx("InsertTheModdedPainElementalClassnameHere",0,0,0,0,0,0,0,SXF_TRANSFERAMBUSHFLAG|SXF_TRANSFERSPECIAL) stop } } EDIT: Or possibly easier and cleaner, use a custom actor derived from RandomSpawner to do via DropItem what the spawner above does via States. 0 Share this post Link to post
Li'l devil Posted April 27, 2016 Poormetheus said:Supposing I want a CACODEMON to actually be a PAIN ELEMENTAL 25% of the time that they spawn in the game, where do I write these script? Does it go in their .txt or does it need to be separate from that?? Just copy this into Decorate:actor CacodemonReplacer: RandomSpawner replaces Cacodemon { DropItem "Cacodemon" DropItem "Cacodemon" DropItem "Cacodemon" DropItem "PainElemental" } It's a very easy random spawner. There're 3 caco entries here and only 1 pain elemental entry, so pain elemental will only spawn 1/4 of the time (and that's 25%). 0 Share this post Link to post
scifista42 Posted April 27, 2016 ^ In your code as it stands, "DropItem Cacodemon" would spawn another instance of the CacodemonReplacer itself, because it "replaces Cacodemon". So, the "Cacodemon" after "DropItem" must be replaced by a different class that actually is the Cacodemon. And said actual Cacodemon actor needs to be altered to not have "replaces Cacodemon" in its definition anymore. Then it will work. 0 Share this post Link to post
Li'l devil Posted April 27, 2016 scifista42 said:So, the "Cacodemon" after "DropItem" must be replaced by a different class that actually is the Cacodemon. And said actual Cacodemon actor needs to be altered to not have "replaces Cacodemon" in its definition anymore. Then it will work. Oh, sorry, I forgot about that. 0 Share this post Link to post
Poormetheus Posted April 27, 2016 scifista42 said:Something like this: (I haven't tested this particular code, but if it doesn't work as is, a very similar code should work) You, sir, are a genius. It works perfectly! Thank you! ^^ 0 Share this post Link to post
Gez Posted April 27, 2016 ChekaAgent said:Just copy this into Decorate: actor PlainOldCaco : Cacodemon {} actor CacodemonReplacer: RandomSpawner replaces Cacodemon { DropItem "PlainOldCaco" 255 3 DropItem "PainElemental" } There, so that there's one valid example or RandomSpawner use in the thread. 0 Share this post Link to post
baja blast rd. Posted April 28, 2016 Is it possible in GZDB to bind an action such that it's triggered in two separate ways? ([key1] or [key2] each on their own, not simultaneously.) 0 Share this post Link to post
Frisky Posted April 28, 2016 So, quick question. When I open a door in my map, it will sometimes create this invisible wall or whatever that prevents me from going through. It also glitches a sector for some reason. 0 Share this post Link to post
MaxED Posted April 28, 2016 rdwpa said:Is it possible in GZDB to bind an action such that it's triggered in two separate ways? No. 0 Share this post Link to post
TheMightyHeracross Posted April 28, 2016 If you're in UDMF, you can. Besides that, don't think so. 0 Share this post Link to post
scifista42 Posted April 28, 2016 Frisky said:So, quick question. When I open a door in my map, it will sometimes create this invisible wall or whatever that prevents me from going through. It also glitches a sector for some reason. Make sure that your door (the sector that gets affected by the door linedef action) consists of only 1 sector rather than multiple ones. 0 Share this post Link to post
illuknisaa Posted April 29, 2016 I'm trying to make a door that needs a keycard and after the door is opened by the player the required keycard gets removed but for some reason keycard does not get removed. script "DoorLock" (void) { Generic_Door (0,32,1,0,0); TakeInventory (T_YELLOWKEYCARD,1); } 0 Share this post Link to post
Kappes Buur Posted April 29, 2016 TryTakeInventory ("T_YELLOWKEYCARD", 1); 0 Share this post Link to post
scifista42 Posted April 29, 2016 OrTakeInventory ("YellowCard", 1);It's because TakeInventory accepts the thing's class name, not its spawn id. 0 Share this post Link to post
Gez Posted April 29, 2016 Kappes Buur said:TryTakeInventory ("T_YELLOWKEYCARD", 1); No. T_YELLOWKEYCARD is a constant identifier, not a string. (The compiler replaces it by 87.) Scifista's answer is correct. 0 Share this post Link to post
illuknisaa Posted April 29, 2016 "yellowcard" works. ty EDIT: Is there a way to make so that the player can't pick up more than one keycard or make keycards stack? 0 Share this post Link to post
Gez Posted April 29, 2016 illuknisaa said:Is there a way to make so that the player can't pick up more than one keycard or make keycards stack? Sure. Read up on inventory property and then make your custom key an item with an Inventory.MaxAmount of 1 or whatever number you want. Yeah, you will have to replace the standard keys with custom types to do that. And your custom keys cannot be derived from the normal "key" base class, as well. 0 Share this post Link to post
illuknisaa Posted April 30, 2016 I added some custom sprites to my wad and now gzdoom builder complains "error in actor "coffeemug". unsupported sprite name format "cmuga" decoratate *******ion:Actor CoffeeMug 257 { //$Category Decoration +FloorClip Height 7 Radius 2 States { Spawn: CMUG A -1 Stop } } I've used this same actor in an another wad and it worked fine there. Sprite name is CMUGA0. edit: d-e-f-i-n-a-t-i-o-n is censored? 0 Share this post Link to post
BrainMuncher Posted April 30, 2016 illuknisaa said:edit: d-e-f-i-n-a-t-i-o-n is censored? ******* Hmmm, seems that way. Funny, d-e-f-i-n-a-t isn't even a word. 0 Share this post Link to post
MaxED Posted April 30, 2016 illuknisaa said:error in actor "coffeemug". unsupported sprite name format "cmuga" This means the editor is unable to find a valid sprite, which name starts with "cmuga", in the sprites namespace. 0 Share this post Link to post
Gez Posted April 30, 2016 illuknisaa said:decoratate *******ion: <snip> edit: d-e-f-i-n-a-t-i-o-n is censored? The correct spelling is "definition". Also, DECORATE. 0 Share this post Link to post
DooM_RO Posted May 1, 2016 How do I add custom music and text for the end of the episode? 0 Share this post Link to post
illuknisaa Posted May 1, 2016 @DooM_RO You need to define it in the MAPINFO lump. http://zdoom.org/wiki/Intermission_script I have a custom actor and trying to call it from a script (eg. ThingSpawn) but when I do nothing happens. decorate:Actor OneUseYellowCard : Inventory 258 { //$Category Keys Inventory.PickupMessage "You picked up a yellow keycard." Inventory.Icon "STKEYS1" Inventory.MaxAmount 100 SpawnID 258 States { Spawn: YKEY A 10 YKEY B 10 Bright Loop } } 0 Share this post Link to post
DooM_RO Posted May 1, 2016 illuknisaa said:@DooM_RO You need to define it in the MAPINFO lump. http://zdoom.org/wiki/Intermission_script I have a custom actor and trying to call it from a script (eg. ThingSpawn) but when I do nothing happens. decorateActor OneUseYellowCard : Inventory 258 { //$Category Keys Inventory.PickupMessage "You picked up a yellow keycard." Inventory.Icon "STKEYS1" Inventory.MaxAmount 100 SpawnID 258 States { Spawn: YKEY A 10 YKEY B 10 Bright Loop } } Yes, but I also want it to work on PrBoom+. I've downloaded WhackED4. I changed the level name and intermission text (but not music yet) but I get this error: Traceback (most recent call last): File "src\whacked4\ui\mainwindow.py", line 685, in file_save File "src\whacked4\ui\mainwindow.py", line 330, in save_file File "src\whacked4\dehacked\patch.py", line 220, in write_dehacked File "src\whacked4\dehacked\patch.py", line 262, in write_patch_ext_strings UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 351: ordinal not in range(128) The level names are changed but not the intermission text. I wrote it in Word and copy pasted it...I don't know why but something tells me this is the problem. 0 Share this post Link to post
Chezza Posted May 1, 2016 If you have a Doom remix song you're using in your wad that you would like to submit to the Doom Archives however the artist is unknown despite searching for him or her, how can one go about it? Is it possible to submit while claiming of unknown (but mention you're prepared to adjust asap) Or is the Wad on archive deadlock until all songs are credited? 0 Share this post Link to post
DooM_RO Posted May 2, 2016 Right. My intermission text is fine in Zdoom but it doesn't have enough space in PrBoom+. Is there any way to fix this or change the font of the intermission text? 0 Share this post Link to post