Page 2 of 3

Re: The Cursed 0.14

Posted: 23 Nov 2009, 19:45
by azaremoth
wilbefast wrote:Couple of thing I noticed ages ago but forgot to say:
- Morph can be queued but Burrow can't, so you can't order a unit to "move to X and then burrow".
- Morphing or burrowing a unit removes it from its control group.
Good points there... I hope our lua-wizard can do something there. :wink:

Re: The Cursed 0.14

Posted: 23 Nov 2009, 19:50
by CarRepairer
I didn't write the burrowing code but I'll take a look at rewriting much of it to allow for the queuing and ctrl-group saving, depending on priority compared to other things.

Re: The Cursed 0.14

Posted: 24 Nov 2009, 19:32
by azaremoth
Take a cookie! :-)

Image

Re: The Cursed 0.14

Posted: 24 Nov 2009, 20:21
by AF
You be stealin ma cookehs?

Re: The Cursed 0.14

Posted: 24 Nov 2009, 20:32
by CarRepairer
Damn that looks like a tasty cookeh. But I don't trust you, it's evil and was summoned by a Lich.

Re: The Cursed 0.14

Posted: 24 Nov 2009, 22:15
by azaremoth
It is a tasty and very healthy cookeh. Take it.... It is good.... Made of good... hmm... things... Muahahaa :twisted:

Re: The Cursed 0.14

Posted: 24 Nov 2009, 22:21
by wilbefast
Didn't your mother ever tell you not to accept sweets from creepy floating dead people with giant hands? I know mine did :?

Re: The Cursed 0.14

Posted: 06 Dec 2009, 21:04
by azaremoth
Image

Skeletons, Skeletal Mages and Gunners will be waterproof in the next release. Only skeletons will be able to attack underwater though. To expand your base over water you will have to get some liches first. 8)

Re: The Cursed 0.14

Posted: 08 Dec 2009, 08:25
by wilbefast
Kewl :mrgreen:

Keep up the good work!

Re: The Cursed 0.14

Posted: 08 Dec 2009, 23:02
by Saktoth
Skeleton range is/will be spherical? If anything floats, whether skeletons can hit it or not will depend entirely on water depth (we had this problem with the Can when it was amph).

Re: The Cursed 0.14

Posted: 09 Dec 2009, 07:04
by wilbefast
Could be problematic since nothing can attack underwater except other skeletons :?

Had this problem with my Trojan Horses as it happens: water is a lot more shallow than it realistically "should" be, so I guess you have to cheat a bit...

Re: The Cursed 0.14

Posted: 09 Dec 2009, 19:08
by azaremoth
Saktoth wrote:Skeleton range is/will be spherical? If anything floats, whether skeletons can hit it or not will depend entirely on water depth (we had this problem with the Can when it was amph).
OK - I see. the weaponrange seams to be calculated from the surface (water) not from the unit's center. Did you solve it in CA somehow?
wilbefast wrote:Could be problematic since nothing can attack underwater except other skeletons

Had this problem with my Trojan Horses as it happens: water is a lot more shallow than it realistically "should" be, so I guess you have to cheat a bit...
Definitely - Maybe I just disable the skeleton's weapon underwater.

Re: The Cursed 0.14

Posted: 09 Dec 2009, 20:33
by wilbefast
azaremoth wrote:OK - I see. the weaponrange seems to be calculated from the surface (water) not from the unit's centre.
That may be why I'm having a problem...

Myself I'd really like to see skeletons fighting underwater, otherwise you can effectively stock units underwater and have them totally unassailable (this might actually cause even more problems in itself) - disable it if you must but I'm pretty confident that somewhere, somebody has figured it out :|

Re: The Cursed 0.14

Posted: 09 Dec 2009, 20:36
by CarRepairer
azaremoth wrote:
Saktoth wrote:Skeleton range is/will be spherical? If anything floats, whether skeletons can hit it or not will depend entirely on water depth (we had this problem with the Can when it was amph).
OK - I see. the weaponrange seams to be calculated from the surface (water) not from the unit's center. Did you solve it in CA somehow
I don't know about any solutions but in CA we eventually dropped the amphib ability of Cans. But I agree that we should find a solution because skeletons would be cool to fight underwater. I'll play around with it as well.

Re: The Cursed 0.14

Posted: 13 Dec 2009, 15:51
by azaremoth
I have a little work-around:

Code: Select all

local function Watercheck()
	while true do
      	local x, y, z = Spring.GetUnitPosition(unitID)
		if y < (-40) then
			indeepwater = true
			end
		if y > (-40) then
			indeepwater = false
			end
		Sleep(500)
	end
end

function script.AimWeapon1(heading, pitch)
	Signal(SIG_AIM1)
	SetSignalMask(SIG_AIM1)
	Turn( chest, y_axis, heading, 250 )
	if indeepwater ~= true then
		Turn( chest, x_axis, 0 - pitch, 250 )
		end
	if indeepwater then
		if pitch < 0.6 then
			Turn( chest, x_axis, 0 - pitch, 250 )
		else
			return false
		end
	end
   	WaitForTurn(chest, y_axis)
	StartThread( RestoreAfterDelay) 
    return (1)
end
It works nice. The function for the waterdepth-check uses -40 as border-value because the weaponrange of the skeleton is 50 and the hovering units are little above the water.

Re: The Cursed 0.14

Posted: 14 Dec 2009, 04:42
by Saktoth
No, weapons dont use the surface to detect weapon range. Thats not the problem. If thats what your problem appears to be, then its much more likely that you are using a weapon with a cylindrical weapon range (IE your skeletons can hit something if they are on top of a cliff above it, or can even hit planes, if their target cats allow it).

Use the heightmod=1 tag to ensure your range is spherical.

I dont get the point of blocking the shot underwater though: Just make it a non-waterweapon?

Re: The Cursed 0.14

Posted: 14 Dec 2009, 08:36
by wilbefast
@Aza: sweet, lua! Truly I am starved for examples! I mean, there's understanding lua syntax and then there's understanding how it interfaces with Spring: all the functions like Spring.GetUnitPosition(unitID) and so on.

@Saktoth: That may possible be what's happening here:
Image

I thought CylinderTargeting needed its own tag (I haven't added it) - what's the default? Either way I'll give HeightMod a try :wink:

edit - probably already seen this a trillion times but (I only just stumbled across it):
Image
Image

by imbaczek

So I'm thinking HeightMod = 2?

Re: The Cursed 0.14

Posted: 14 Dec 2009, 19:29
by azaremoth
Saktoth wrote:No, weapons dont use the surface to detect weapon range. Thats not the problem. If thats what your problem appears to be, then its much more likely that you are using a weapon with a cylindrical weapon range (IE your skeletons can hit something if they are on top of a cliff above it, or can even hit planes, if their target cats allow it).

Use the heightmod=1 tag to ensure your range is spherical.

I dont get the point of blocking the shot underwater though: Just make it a non-waterweapon?
I'll try to illustrate it. I hope there is no easier solution (like a working heightmod-tag for underwater).

Image
wilbefast wrote:sweet, lua! Truly I am starved for examples! I mean, there's understanding lua syntax and then there's understanding how it interfaces with Spring: all the functions like Spring.GetUnitPosition(unitID) and so on.
Car somehow managed to push me towards using lua for animation scripts. It is beneficial in most cases. :wink:

Re: The Cursed 0.14

Posted: 14 Dec 2009, 19:44
by wilbefast
Awesome diagrams - I did a few tests myself: the most obvious thing is the way the the targeting circle draws at the surface of the water not at unit-level :?

I haven't managed to get heightMod to all that well myself - it's suggested that you use cylinderTargeting for melee units in the wiki though, with a very short cylinder height.
I'd do a few more tests and so on but I have exams, and I've made a pact (to myself) not to work on my mod till after they're finished :( (wish me luck!)

Keep working at it Aza! This mod is seriously under-rated: can't wait to see the mini-gunship in-game too :mrgreen: (next update?)

Re: The Cursed 0.14

Posted: 14 Dec 2009, 20:18
by azaremoth
wilbefast wrote:Keep working at it Aza! This mod is seriously under-rated: can't wait to see the mini-gunship in-game too :mrgreen: (next update?)
Sure - The next release isn't far away. Small things like making burrowing queuable caused a bigger amount of work.