disable 'fog of war' and/or 'line of sight'

disable 'fog of war' and/or 'line of sight'

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

Post Reply
cdquiksilver
Posts: 3
Joined: 04 Dec 2007, 15:28

disable 'fog of war' and/or 'line of sight'

Post by cdquiksilver »

Hello All,

I am a long-time TA fan and have just found spring, it looks amazing, great work to all involved!

I enjoy playing LAN games 'skirmish' co-op games on LAN in TA.
we like playing in a 'sandbox' environment holding off waves of AI with base defence. we play with no fog of war and able to see other enemy units.

I can't seem to find the option to set up spring like I used to play TA

can anyone help me locate these options?

many thanks
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

These options don't exist but I have a LuaRule that makes all units always visible if the mod includes it.
ZellSF
Posts: 1187
Joined: 08 Jul 2006, 19:07

Post by ZellSF »

KDR_11k wrote:These options don't exist but I have a LuaRule that makes all units always visible if the mod includes it.
Does defences fire at their max range though, or do they wait until the unit comes into "real" los?
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

KDR_11k wrote:These options don't exist but I have a LuaRule that makes all units always visible if the mod includes it.
Also, does that include projectiles/explosions/wreckage/etc, or just units?
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Post by TradeMark »

I suggested this feature like 2 years ago and nothing happened... so forget it.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

this would be useful for balancing mods too
cdquiksilver
Posts: 3
Joined: 04 Dec 2007, 15:28

Post by cdquiksilver »

Hello All,

thanks for the replies,

KDR_11k - would it be possible to share this LUA? also some info to help 'add' it to a mod if thats possible?

I am quite adapt at modding other games and creating content, but I am very new to spring.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Pxtl wrote:
KDR_11k wrote:These options don't exist but I have a LuaRule that makes all units always visible if the mod includes it.
Also, does that include projectiles/explosions/wreckage/etc, or just units?
Only units ATM, wreckages may be possible but to make explosions and projectiles LOS-free, you need to add alwaysVisible to all of them and for weapons that only works with SVN.

The code is really simple:

Code: Select all

function gadget:GetInfo()
	return {
		name = "noLOS",
		desc = "Disables LOS",
		author = "KDR_11k (David Becker)",
		date = "2007-11-18",
		license = "Do what you feel like",
		layer = 1,
		enabled = true
	}
end

if (gadgetHandler:IsSyncedCode()) then

--SYNCED

function gadget:UnitCreated(u, ud, team)
	Spring.SetUnitAlwaysVisible(u,true)
end

end
User avatar
Complicated
Posts: 369
Joined: 06 Jun 2007, 18:51

Post by Complicated »

If it is your AI, press B and you can tract unit movements.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Just noticed there was another question. Yes, units will shoot at alwaysVisible units with full accuracy. Fibre has zero LOS and everything still works nicely.
User avatar
GrOuNd_ZeRo
Posts: 1370
Joined: 30 Apr 2005, 01:10

Re: disable 'fog of war' and/or 'line of sight'

Post by GrOuNd_ZeRo »

A cheap hack would be a cloaked flying unit that flies at very high altitude and has a huge LOS ;)
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: disable 'fog of war' and/or 'line of sight'

Post by TradeMark »

GrOuNd_ZeRo wrote:A cheap hack would be a cloaked flying unit that flies at very high altitude and has a huge LOS ;)
doesnt work, the range where unit can see is limited, spring bug

and i bet that doesnt work perfectly on hilly maps anyways
Post Reply

Return to “General Discussion”