Some maps do not have geovents.
I have a gadget that lays geovents on the metal spots of such map.
This gadget only work when the feature "geovent" is actually defined.
Old mapconv used to declare geovent and many kind of trees whenever compiling a map, even if no feature of this type was actually placed.
Some newest map compiler do not add the geovent feature def in the map when there isn't any geovent placed on the map.
On those maps, Kernel Panic gadget Lua fails.
I want to fix that Kernel Panic gadget.
I am trying to add a geovent feature (or a "datavent" feature with geoThermal=true) into the pregame FeatureDefs_post.
It appears to be impossible because FeatureHandler.cpp doesn't read any geoThermal tag or similar. So only the engine can make a geovent feature, and if it decide to not, I'm screwed. Mods cannot have their own geo!
An additional issue is that the engine add (or not) the geovent feature *after* the pregame featuredefs_post.lua, so inside the FeatureDefs_post I can't even know if the engine will decide to add a geovent feature def or not.
I request geovent feature def to be always added by engine.
Baring that I request letting mods add their own geothermal vents.
Let mod add geo even if map has none!
Moderator: Moderators
Re: Let mod add geo even if map has none!
I request both! 

Re: Let mod add geo even if map has none!
My /gamedata/featuredefs_post.lua (or, to tell the truth, in KP I use a /gamedata/anydefs_post.lua) had:
I also have a widget that goes:
The relevant C++ source file is /rts/Sim/Features/FeatureHandler.cpp
Code: Select all
FeatureDefs["datavent"]={
description="Data Vent",
geoThermal=1,
footprintx=0,
footprintz=0,
height=0,
blocking=0,
reclaimable=0,
drawType=-1,
}
Spring.Echo("========================================")
for n,fd in pairs(FeatureDefs) do
Spring.Echo("========================================")
Spring.Echo("FeatureDefs["..n.."]")
for key,value in pairs(fd) do
Spring.Echo(key,value)
end
end
Spring.Echo("========================================")
Code: Select all
function widget:GetInfo()
return {
name = "Echo FeatureDefs",
desc = "Dump in infolog the content of FeatureDefs",
author = "zwzsg",
date = "The Ninth of April Two Thousand and Eleven",
license = "Free",
layer = 0,
enabled = true
}
end
function widget:Initialize()
for id,featureDef in pairs(FeatureDefs) do
Spring.Echo("----------------------------------------")
for name,param in featureDef:pairs() do
Spring.Echo(name,param)
end
Spring.Echo("----------------------------------------")
end
end
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Let mod add geo even if map has none!
This.FLOZi wrote:I request both!
Re: Let mod add geo even if map has none!
I'd even suggest that it might be sensible in the long run for springcontent.sdz to hold these feature defs and not the engine code itself.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Let mod add geo even if map has none!
Couldn't we just make a gadget that removes all geovents from maps and lets us place our own (Tie it to a feature maybe?)
And yeah, +1 with flozi
And yeah, +1 with flozi
-
- Posts: 834
- Joined: 19 May 2009, 21:10
Re: Let mod add geo even if map has none!
When checking for geoThermal tag, it's possible to create geovents on your own.
Create the feature definition and place them on the map with CreateFeature.
Create the feature definition and place them on the map with CreateFeature.
- Attachments
-
- geovent on Dark Side Remake
- geovent.jpg (23.89 KiB) Viewed 2643 times
Re: Let mod add geo even if map has none!
Thanksalot, SirMaverick!Commits
sirmaverick (author)
about 1 hour ago
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Let mod add geo even if map has none!
SirMaverick wrote:When checking for geoThermal tag, it's possible to create geovents on your own.
Create the feature definition and place them on the map with CreateFeature.

Thanks mav!