forums | blogs | polls | tutorials | downloads | rules | help

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in remember_me_form_alter() (line 78 of /var/www/siegetheday.org/sites/all/modules/contrib/remember_me/remember_me.module).

An Idea for Random Objects

I was thinking if I an figure out an algorithm to randomly place objects in the world to make mapping less tedious, then we could dynamically randomize any object. In theory we could recompile the map after randomizing the monsters with a script, making ds2 or ds1 dynamic. A possible feature could be the user selecting the monster density, levels, types, etc.

blogs: 

Comments

Dulac that is a very interesting idea random anything and everything.
Elf

That would be truly awesome. I’ve thought about that idea, but don’t have the technical prowess to pull it off, let alone where to start. Making objects dynamically appear in groups (foliage) based on biome would be really amazing.
There is the ‘next object’ took in the DS1 editor that allows you to place objects with different scales and rotations, maybe that can be applied somehow?
Fantastic idea, if there’s anything I can do to help do let me know. If something like this is possible, it’d make creating a map a lot quicker.

Now if only a terrain generator could be created as well... THAT would be a godsend.

Sadly I'm busy atm. However, when I get spare time, I will see if I can come up with an algorithm that randomly places objects. It could be done in something like python or another language. Just need to read terrain data and write to the object data inside of a map. Then maybe a script can be used to compile the map (it can tell real tank creator to compile). First stage would be to get items to be placed randomly with a scale and rotation range. Then move onto making it dynamic. Monsters templates could be read to generate new templates with a script and recompiled as well. That's how a level adjustment could be done. Then they could get populated with the script. This would take time of course.

On my linux machine, so don't have access to the gas files. However if you look in GPG's map folder, you will see an objects folder that contains the placement information that could be automated with a script. The terrain folder contains data of the terrain node ids in that region, which is part of the data needed to randomize the object placement in the placement block.

A biome correlation could be done. There should be data on which set is used. It could be based on set and a collection of objects that are from that particular biome. Or you could have a collection of objects associated with biome types that the end user could select.

I've thought about terrain generation. I can't remember if I mentioned it in the post. It's much tougher, since nodes are not that modular. I was thinking maybe prefabbed or "node chunks" that conform could make it possible to randomize. I've just been theorizing about the whole thing, since mapping is a real pain. Maybe it can be done to be just good enough to generate a region that a map maker could edit. That would be enough to save a lot of time.

Edit: What would be helpful if you don't know programming in a language such as python is a template name list of the objects and monsters with their names. Maybe even an entry on this site that provides a picture of them as well.

One approach I thought of for randomized maps could be prebuilt regions that can be swapped randomly. Then the objects can be randomized for these regions. This would give us a lot of randomness for maps. It can get recompiled after the scripts run or ran in ds2mod or dsmod to read from bits. Both games have the same structure for maps. This is more so for playing rather than map making, however. Of course one could keep the randomized map and edit it.

As a community we could work on the prebuilt regions. However, I would want to make a proof of concept before asking for help. They would also have to be built a certain way to work.

Yeah, like you said before, instead of randomizing individual nodes, some pre constructed prefabs could be created by hand to then be randomized... or something like that. I can’t even begin to fathom how that would work, but it would most certainly be cool.