Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
RocknRoll420

Doomablo - Can zDoom do this?

Recommended Posts

This idea came to my mind when thinking about new ways to use doom. I wanted to see what could be done in the vein of Borderlands or Diablo. Could a monster's death spawn a randomized item drop? Where the item could be health, armour, ammo, powerup, or a weapon (or something else?) with properties chosen at random (in a sensible way). A randomized weapon could be a lot of things, but to keep it simple let's say it'd be something that was an existing weapon with modified stats (e.gs firing speed, capacity, damage, splash radius) and a palette shift. So without explicitly defining 255 variants of the rocket launcher could we get an enemy to drop a rocket launcher which (for example) does 50% more damage, fires 10% slower, and splash damages twice the radius?

Ideally I'd like to be able to:

1. Spawn randomized groups of enemies at set locations on a map
2. When one of these enemies dies there is a chance to drop an item
The items which drop have their explicit stats randomized on dropping (this would be more/less healing from health, more/less ammo in pickups, various modifications to weapons)

I was messing around with getting some of these ideas going but got hung up when trying to get a monster to drop an item where it died (as far as I can tell DropItem in decorate is no good because it is an explicit list of items and I ultimately need to be able to drop any item). So, if anyone has suggestions to spawning an item chosen at random at a monster's location upon its death I'd love to hear them. I was trying to run a script on the monster's death that spawned an item at its location but the GetActorX(tid), GetActorY(tid) calls don't work after the monster is dead.

Share this post


Link to post

I think you simply need to define an explicit list of items anyway, even if very large. Regarding the spawning itself, I can recommend using a dummy spawner actor dropped by the monster + A_Jump + A_SpawnItemEx. Like this:

actor DummySpawner {
  States {

  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(255,"Item1","Item2","Item3") // As many states as you want, which in your case means really many.

  Item1:
    TNT1 A 0 A_SpawnItemEx("HealthBonus")
    stop

  Item2:
    TNT1 A 0 A_SpawnItemEx("ArmorBonus")
    stop

  Item3:
    TNT1 A 0 A_SpawnItemEx("Shotgun")
    stop

  }
}

actor DoomImp2 : DoomImp replaces DoomImp {
  DropItem "DummySpawner"
}
actor Demon2 : Demon replaces Demon {
  DropItem "DummySpawner"
}

// And so on - redefine all monsters to spawn the Dummy Spawner.
EDIT:

Just now I've realized that you probably wanted many different variants of items without explicitly coding each of them. That's not possible for the purpose you want to achieve, as far as I know. Each different actor needs its own name and a DECORATE code (unless you want to change the very basic things, then ACS can possibly be used to alter them a bit in particular instances). You just have to end up with a big list.

Share this post


Link to post

Thanks for the great replies. That BorderDoom mod has already implemented much of the stuff I would want to do. I'll figure out how to do it from there. Good tip with the DummySpawner that should be able to handle my item dropping needs.

Open for more suggestions related to spawning items with randomized stats.

More questions of course:

How much support is there for a level and attribute points system already built in? I'd like to be able to get exp from killing bad guys, earn more and level up (I see that is happening in BorderDoom already). Upon level up you'd get some sort of choice of what you want to increase: maxhealth, armor, speed, that sort of stuff. I'd like to be able to alter these values by equipping items as well.

Is it possible to save this sort of a gamestate? (excuse me if this is a stupid question I don't know much about zdoom yet) Something where you're not just saving positions of things on the map but also your current level, experience, inventory, etc.

I don't have a lot of time right now to work on something like this but the idea is interesting to me. I'm just trying to learn as much as I can about specific problems I know I will face.

Share this post


Link to post
RocknRoll420 said:

How much support is there for a level and attribute points system already built in?

Built in? None, I'd say. ZDoom is still an engine for an FPS game and is focused on that -- it's not a (full-fledged) RPG engine. It may have few elements here an there, but nothing too complex. All of this RPG stuff is on you, the modder, to figure out and achieve with whatever combination of features ZDoom offers. They're certainly possible, but the majority of the work is from the modding side, not from the engine's. So expect to do a lot of coding if you want something as complex as that. ACS and DECORATE are what's needed, mainly.

Is it possible to save this sort of a gamestate?

Normal game saving preserves everything(?) retaining to the gamestate, including that stuff.


Edit: I just thought, since you seem to be interested in RPG, you might want to check this mod. It's in a far better developmental state than BorderDoom, and is quite popular amongst ZDoomers.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×