Map edges, how can they be fixed?
Moderator: Moderators
Re: Map edges, how can they be fixed?
So, when a map include its own solution for map edges, how does it tell the mod-side code that draw Forb's grid to switch itself off?
Re: Map edges, how can they be fixed?
the part of smoth's post that was relevant:
(no idea how to duplicate posts so here it is again)
still unsolved
trigger file seems bad, global widget variable (WG.allowGameToDrawMapEdges=true/false) seems better.
Or a real config file that also allows the game-widget to read some things from map like grid color, texture etc.
(no idea how to duplicate posts so here it is again)
-----------------smoth wrote:Zwzsg:
Forb could add a trigger file to have the widget not turned on unless the map includes say enfranchiser.txt.
still unsolved

trigger file seems bad, global widget variable (WG.allowGameToDrawMapEdges=true/false) seems better.
Or a real config file that also allows the game-widget to read some things from map like grid color, texture etc.
Re: Map edges, how can they be fixed?
That is what I mean though, say like gundam's feature placer.. it can contain values but if it is not present at all, then the widget does nothing because it's config was not found..
Re: Map edges, how can they be fixed?
Never has a new mod announcement been so unloved =(
Re: Map edges, how can they be fixed?
Maybe the mod-side widget could check the map archive for traces of Lua, then disable itself if it finds *.lua or a LuaRules or a LuaUI folder?
Re: Map edges, how can they be fixed?
That would be bad, what if I want to include a widget with maps, pfft too bad not included.
Re: Map edges, how can they be fixed?
evorts/grts: game devs are also map makers -> can do whatever they want
kernel panic: only played on specials maps: should be no conflicts
S44: only played on specials maps: should be no conflicts, game devs also make the maps (i think)
So it is only really a problem for games that use the big pool of old "one size fits all" maps.
Since none of those maps include a mapedge widget, it would have to be in the game anyway. At that point it makes sense that this game-widget "listens" for maps "trying to turn it off" via config files. And new maps with such widgets should include such files.
But so far, no mapedge-widget-map has been made for any mapedge-widget-mod. And I guess not many mapedge-widget-maps will be made. Mods could also include a list on which maps to disable the widget. (eg on Beheriths asteroid map, maps that have a fog widget etc)
kernel panic: only played on specials maps: should be no conflicts
S44: only played on specials maps: should be no conflicts, game devs also make the maps (i think)
So it is only really a problem for games that use the big pool of old "one size fits all" maps.
Since none of those maps include a mapedge widget, it would have to be in the game anyway. At that point it makes sense that this game-widget "listens" for maps "trying to turn it off" via config files. And new maps with such widgets should include such files.
But so far, no mapedge-widget-map has been made for any mapedge-widget-mod. And I guess not many mapedge-widget-maps will be made. Mods could also include a list on which maps to disable the widget. (eg on Beheriths asteroid map, maps that have a fog widget etc)
Re: Map edges, how can they be fixed?
No, the problem is what I want the maps I make to be playable with the Cursed, EvoRTS, and even GRTS, without having the VR grid forced on me.
Re: Map edges, how can they be fixed?
z, at what point does the project get to have control over it's world?
what if something like a noborder.txt was all you needed to add to ensure I don't do any grid shit to your map?
What is to keep players from installing it into their luawidgets and saying lol at your maps?
what if something like a noborder.txt was all you needed to add to ensure I don't do any grid shit to your map?
What is to keep players from installing it into their luawidgets and saying lol at your maps?
Re: Map edges, how can they be fixed?
If that happens the widget should read the configfile in the map and turns itself off. Atm the widget does not have that function, so it should ideally not be spread among players.What is to keep players from installing it into their luawidgets and saying lol at your maps?
Re: Map edges, how can they be fixed?
and what if they disable the check. that is my point.knorke wrote:If that happens the widget should read the configfile in the map and turns itself off. Atm the widget does not have that function, so it should ideally not be spread among players.What is to keep players from installing it into their luawidgets and saying lol at your maps?
Re: Map edges, how can they be fixed?
I would assume how the map looks belongs to the map. I'm ok with Forb's widget being used mod side as a failsafe when it's an old map that surely has unpretty border. I just want all you guys to settle on a method to autodisable it from the map when the map know what it does.
Tonight I tried my map project with the newly released Cursed, and was greeted by:

So I'm not bitching just for the fun of it, I want to release V3 of that map in the next few days, and I want it to look pretty with The Cursed, EvoRTS, GRTS, etc... without the player having to fumble with the widget list.
I'm asking for all coders to find a solution NOW, hopefully before map edge widgets have spread to far, to make sure every map edge widget thing will follow the same standard way to get disabled.
Tonight I tried my map project with the newly released Cursed, and was greeted by:

So I'm not bitching just for the fun of it, I want to release V3 of that map in the next few days, and I want it to look pretty with The Cursed, EvoRTS, GRTS, etc... without the player having to fumble with the widget list.
Sure, whatever, as long as everybody agrees to follow it.what if something like a noborder.txt was all you needed to add to ensure I don't do any grid shit to your map?
I'm asking for all coders to find a solution NOW, hopefully before map edge widgets have spread to far, to make sure every map edge widget thing will follow the same standard way to get disabled.
Yes, if someone really wants to, he can always disfigure our work locally. That is not the point. The point is when a naive player download mod X and map Y, by default it works reasonably well without conflicts.smoth wrote:What is to keep players from installing it into their luawidgets and saying lol at your maps?
Re: Map edges, how can they be fixed?
I cannot control what others do but how about this:
SUGGESTION FOR MAP EDGE WIDGETS:
ALL MAP EDGE WIDGETS MUST DISABLE THEMSELF IF THE MAP CONTAINS THE FILE:
it will be located in the base map directory..
I cannot control everyone but I will go ahead and add support for it this weekend some time.
that fair enough?
I kindly request that others making a map edges widget do the same.
SUGGESTION FOR MAP EDGE WIDGETS:
ALL MAP EDGE WIDGETS MUST DISABLE THEMSELF IF THE MAP CONTAINS THE FILE:
NOMAPEDGEWIDGET.TXT
it will be located in the base map directory..
I cannot control everyone but I will go ahead and add support for it this weekend some time.
that fair enough?
I kindly request that others making a map edges widget do the same.
Re: Map edges, how can they be fixed?
idea:
widget looks for config file named mapedges_config.lua in root folder of the map.
mapedges_config.lua looks like this:
options =
{
enabled = true, --should mod draw mapedges?
gridColor = {red=128,blue=64,green=255}, --color of the grid
gridTexture = "blub.png", --what texture to use (first look in map, then in mod)
tileSize = 64, --resolution of the grid
drawRange = 1000, --how far beyong map edge the grid is drawn
}
return options
The file returns a table with various entries:
The purple stuff is entirely optional - it is just so that mappers can adjust the look of the grid a bit. (think of it how sky or water color is adjustable)
If certain games/widgets do not use all entries that is okay too.
The important part is the enabled=true/false
enabled=false -> game widget disables itself
In case that is not clear: If a map does not want the game to draw mapedges:
Include such file:
mapedges_config.lua:
options ={enabled = false, }
return options
widget looks for config file named mapedges_config.lua in root folder of the map.
mapedges_config.lua looks like this:
options =
{
enabled = true, --should mod draw mapedges?
gridColor = {red=128,blue=64,green=255}, --color of the grid
gridTexture = "blub.png", --what texture to use (first look in map, then in mod)
tileSize = 64, --resolution of the grid
drawRange = 1000, --how far beyong map edge the grid is drawn
}
return options
The file returns a table with various entries:
The purple stuff is entirely optional - it is just so that mappers can adjust the look of the grid a bit. (think of it how sky or water color is adjustable)
If certain games/widgets do not use all entries that is okay too.
The important part is the enabled=true/false
enabled=false -> game widget disables itself
In case that is not clear: If a map does not want the game to draw mapedges:
Include such file:
mapedges_config.lua:
options ={enabled = false, }
return options
Re: Map edges, how can they be fixed?
whatever, I don't care.. just so people are happy and I can move along.
Re: Map edges, how can they be fixed?
knorke: That seem very specific to grid based map edge cover solutions. What about mods that cover the map edges with noise, fog, the minimap texture, or novel exotic solutions?
Smoth's way seem more generic.
Smoth's way seem more generic.
Re: Map edges, how can they be fixed?
if the widget is looking for "gridColor" but only finds "noiseColor" then it simply uses its default for "gridColor." (and other way around)
or only do the enabled=true/false thing if you dont care about the rest.
But since it is a lua file you could also do configs like
if game=="the cursed" then enabled=true --cursed's widget looks ok with this map!
if game=="kernel panic" then enabled=false --kp's widget looks bad with this map!
and thus allow some games to draw stuff but overwrite it for others.
or only do the enabled=true/false thing if you dont care about the rest.
But since it is a lua file you could also do configs like
if game=="the cursed" then enabled=true --cursed's widget looks ok with this map!
if game=="kernel panic" then enabled=false --kp's widget looks bad with this map!
and thus allow some games to draw stuff but overwrite it for others.
Re: Map edges, how can they be fixed?
If the mapper has a precise idea of the kind of grid he wants, he'll put a nomapedgewidget.txt and his own grid widget anyway.
Also, jK tells me VFS_MAP not only doesn't work, but will never be implemented. So my idea of having the mod check if the map archive contains Lua folder or files is not possible.
So I say we go with smoth's idea, simple and more future-proof than complex config files:
Also, jK tells me VFS_MAP not only doesn't work, but will never be implemented. So my idea of having the mod check if the map archive contains Lua folder or files is not possible.
So I say we go with smoth's idea, simple and more future-proof than complex config files:
Code: Select all
function widget:Initialize()
if VFS.FileExists("nomapedgewidget.txt") then
widgetHandler:RemoveWidget()
return
end
-- rest of Initialize ....
end
Re: Map edges, how can they be fixed?
true.If the mapper has a precise idea of the kind of grid he wants, he'll put a nomapedgewidget.txt and his own grid widget anyway.
And if the mod wants different looking mapedges for different maps (eg red edges on "red mars", yellow edges on "banana dunes") then the mod can include its own config stuff.
So nomapedgewidget.txt it is?
A Spring.Echo ("found nomapedgewidget.txt, removing myself") before the
widgetHandler:RemoveWidget()
might be good.
-
- Posts: 1398
- Joined: 17 Sep 2008, 04:36
Re: Map edges, how can they be fixed?
Pfff, you programmers and your difficult solutions.
Take a texture like Forb's and change the white to transparency, and magically get grid color matching to maps:

Take a texture like Forb's and change the white to transparency, and magically get grid color matching to maps:
- Attachments
-
- screen00016.jpeg
- (225.05 KiB) Downloaded 2 times