CT maps & where the rocks come from
Moderators: Moderators, Content Developer
CT maps & where the rocks come from
Last edited by knorke on 12 Nov 2010, 16:38, edited 1 time in total.
Re: CT maps & where the rocks come from
stuff will probally be changed a bit and use config files in the map that will be included by the mod using VFS. Also will allow to have config files in the game for maps that do not have their own config file. These default config files will be the same name as the map + some prefix maybe, ie "rocklayout_DeltaSiegeDry.lua" and hooray CT on DSD isnt that fucking great.
Re: CT maps & where the rocks come from
quick question; how about spawning rocks on top of metal spots? that way you don't need to pre-define any "rock spawns" via lua
Re: CT maps & where the rocks come from
I would much rather do it that way kaiserj.
Re: CT maps & where the rocks come from
Metalmap can be a fallback but i doubt it will allow for as much options or work as good as defined spawns.
For most maps it would suck gameplay wise because metalspots are usually spread evenly all over the map whereas you want the rocks to be together in some sort of clusters. Maps could also define what areas they want meteors to drop and where not. I would rather like to see a small number of maps that were made with the rocks concept and CT in mind instead of some halfassed system based something that was made with TA eco and gameplay in mind.
For most maps it would suck gameplay wise because metalspots are usually spread evenly all over the map whereas you want the rocks to be together in some sort of clusters. Maps could also define what areas they want meteors to drop and where not. I would rather like to see a small number of maps that were made with the rocks concept and CT in mind instead of some halfassed system based something that was made with TA eco and gameplay in mind.
Re: CT maps & where the rocks come from
certainly can't disagree with any of your reasoning;
my only point would be that if you did the metal spot thing, then you could use existing tutorials and engine based stuff instead of your own (if i wanted to make a CT map, i could define my rock zones using springmapedit) wheras this coordinates method would require a bit of a tinker methinks, although i guess it would be nice in the respect of being able to change the locations of the rock zones without recompiling the map (right?)
what you're doing is interesting stuff and of course i'd trust your judgement over mine ^^
my only point would be that if you did the metal spot thing, then you could use existing tutorials and engine based stuff instead of your own (if i wanted to make a CT map, i could define my rock zones using springmapedit) wheras this coordinates method would require a bit of a tinker methinks, although i guess it would be nice in the respect of being able to change the locations of the rock zones without recompiling the map (right?)
what you're doing is interesting stuff and of course i'd trust your judgement over mine ^^
Re: CT maps & where the rocks come from
yes i see your point but using the metalmap would require tinkering as well, like how dense/big must a spot be, how many rocks should spawn on it etc: S44 can just put a flag on every spot but for CT you would want several rocks per spot etc.
Thinking of it, I would like to use metalmap for density of meteors dropping. The greener = the more likely meteors fall here.
Ie have a map divided in a crater desert and a jungle and meteors only drop in the desert part. Of course that would make these maps unplayble for any game except CT which would be oh-so-terrible
you would have to repack the map, but compiling would not be nessecary yes. Also you can have different layouts, adjust rock numbers based on players blabla. More interessting things, less more-of-the-same.although i guess it would be nice in the respect of being able to change the locations of the rock zones without recompiling the map (right?)
Thinking of it, I would like to use metalmap for density of meteors dropping. The greener = the more likely meteors fall here.
Ie have a map divided in a crater desert and a jungle and meteors only drop in the desert part. Of course that would make these maps unplayble for any game except CT which would be oh-so-terrible

Re: CT maps & where the rocks come from
You could use grouping and group spots together based on proximity, then take the average position of each group. This way you'd get far fewer groupings of rocks, but theyd tend to be in strategic positions as metal spots in clusters usually are.
Re: CT maps & where the rocks come from
Or you could just make a good resource placement for your map :)
Instead of relaying of some script to do it for you.
Maps no longer need to do Unit.Create themself as that obviously can cause problems.
Instead maps now return a table of rock positions.
A gadget then reads them and places rocks there.
Mappers can either fight with { {}{}7, ( [1] to return a proper Lua table or include a "helper function" in your Lua like
http://code.google.com/p/conflictterra/ ... psAndRocks
Its all on wiki.
Instead of relaying of some script to do it for you.
Maps no longer need to do Unit.Create themself as that obviously can cause problems.
Instead maps now return a table of rock positions.
A gadget then reads them and places rocks there.
Mappers can either fight with { {}{}7, ( [1] to return a proper Lua table or include a "helper function" in your Lua like
Code: Select all
local function SpawnResource (x,y)
newrock = {}
newrock.x = x
newrock.y = y
table.insert (res, newrock)
end
Its all on wiki.
Re: CT maps & where the rocks come from
added some quick thing to place resources on metal.

areyouhappynow
currently disabled because it fills some maps (speedmetal, metalheck) completly with rocks and i dont feel like spending more time on that anyway.
If somebody wants to make a better resources-on-metal thing, feel free to do so. S44 flag placement is probally a good starting point.
(but lets please talk in lobby before you commit changes to any file with tp_ prefix so we can coordinate)
I'll instead concentrate on the config file based system as I believe it gives mappers more controll and what not.

For example a mapmaker of a originally non-CT map can just make a config file for his map instead of having a script randomly spawn stuff on it.

areyouhappynow
currently disabled because it fills some maps (speedmetal, metalheck) completly with rocks and i dont feel like spending more time on that anyway.
If somebody wants to make a better resources-on-metal thing, feel free to do so. S44 flag placement is probally a good starting point.
(but lets please talk in lobby before you commit changes to any file with tp_ prefix so we can coordinate)
I'll instead concentrate on the config file based system as I believe it gives mappers more controll and what not.

For example a mapmaker of a originally non-CT map can just make a config file for his map instead of having a script randomly spawn stuff on it.
Re: CT maps & where the rocks come from
Thanks knorke, this worked well in the hand full of non metal maps i tested this on.
And oddly enough it did not spawn rocks all over the one metal map i tested on. It looks like it spawned just a block of them on the left. Rock Unit cap? or something. I don't know, and I don't really care. I'm alright with not fully supporting every single spring map known to man.
I will wait till i catch you online before it get's enabled. But it worked fantastically otherwise. So thanks a lot.
And oddly enough it did not spawn rocks all over the one metal map i tested on. It looks like it spawned just a block of them on the left. Rock Unit cap? or something. I don't know, and I don't really care. I'm alright with not fully supporting every single spring map known to man.
I will wait till i catch you online before it get's enabled. But it worked fantastically otherwise. So thanks a lot.
Re: CT maps & where the rocks come from
Thats a bug with the extraction spot finder algorithm on some metalmaps.
Just do two things. Add a minimum distance between positions s it doesnt carpet an area, and test if there are more than a certain number of spots found, then assume its a metal map and randomly place
Just do two things. Add a minimum distance between positions s it doesnt carpet an area, and test if there are more than a certain number of spots found, then assume its a metal map and randomly place
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: CT maps & where the rocks come from
You can use the code I already made. It's called easymetal and you can find the latest version in Evo RTS. Works for any map with large or small metal spots.
Re: CT maps & where the rocks come from
thanks :) but I am quite happy with the results of my quite simple solution. It might not be perfect but imo is "good enough" for a fallback system.
Re: CT maps & where the rocks come from
Now with pictures thanks to giant .jpg of doom:
http://code.google.com/p/conflictterra/ ... h_Pictures
Make a CT rock layout for your favorite spring map today!
http://code.google.com/p/conflictterra/ ... h_Pictures
Make a CT rock layout for your favorite spring map today!
Re: CT maps & where the rocks come from
Gross, giant jpeg
Re: CT maps & where the rocks come from
sweet tutorial!