My amphibious units are afraid of water! IN 86!

My amphibious units are afraid of water! IN 86!

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

My amphibious units are afraid of water! IN 86!

Post by Forboding Angel »

Spring Devs, this is a very serious issue that I need resolved immediately, if not sooner. Please tell me why my amphibious units cannot path in water!

Movedefs: http://code.google.com/p/evolutionrts/s ... fs_evo.lua << movedef for this particular unit is TANK2

Unitdef: http://code.google.com/p/evolutionrts/s ... bbuggy.lua

Image
screen00307.jpg
(2.06 MiB) Downloaded 2 times
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: My amphibious units are afraid of water! IN 86!

Post by Kloot »

Code: Select all

depthModMaxValue = 1.111111;
-->

Code: Select all

depthModParams = {maxScale = 1.111111},
and for style

Code: Select all

;
-->

Code: Select all

,
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: My amphibious units are afraid of water! IN 86!

Post by Forboding Angel »

Kloot, that is the value that you told me to use via mantis.

Code: Select all

depthModMaxValue = 1.111111;
I wish you had been more astute. Thanks for the help!
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: My amphibious units are afraid of water! IN 86!

Post by Kloot »

It was changed/finalized later, you always take that risk when using in-development features.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: My amphibious units are afraid of water! IN 86!

Post by Forboding Angel »

Can you please tell me why spring crashes with:

Code: Select all

   TANK2 = {
      footprintx=2,
      footprintz=2,
      maxslope=28,
      maxwaterdepth=5000,
      maxwaterslope=255,
      badwaterslope=255,
      crushstrength=20,
      heatproduced=20,
	  heatmapping=0,
	  depthModParams = {
         minHeight      = 0,
         maxHeight      = 5000,
         maxScale       = 0.3,
         quadraticCoeff = 0.3,
         linearCoeff    = 0.3, -- deprecates "depthMod"
         constantCoeff  = 0.3,
       }
	  minwaterdepth=10,
	  heatmod=50,
	  slopemod=4,
--	  heatmapping=false,
   },
http://pastebin.com/PPZnBTx2
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: My amphibious units are afraid of water! IN 86!

Post by Kloot »

Going out on a limb here:

Code: Select all

Error: 2, gamedata/defs.lua,
  [string "gamedata/defs.lua"]:37:
  [string "gamedata/defs.lua"]:25:
    error = 2, gamedata/moveDefs.lua,
    error = 3, gamedata/movedefs_classes.lua,
      [string "gamedata/movedefs_classes.lua"]:19:
        '}' expected (to close '{' at line 3) near 'heatproduced'

Code: Select all

depthModParams = { ... }
-->

Code: Select all

depthModParams = { ... },
OR

Code: Select all

TANK2 = { ... },
-->

Code: Select all

TANK2 = { ... }
Last edited by Kloot on 02 Mar 2012, 14:04, edited 1 time in total.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: My amphibious units are afraid of water! IN 86!

Post by knorke »

[f=0000000] Failed to load moveDefs
[f=0000000] Error: 2, gamedata/defs.lua, [string "gamedata/defs.lua"]:37: [string "gamedata/defs.lua"]:25: error = 2, gamedata/moveDefs.lua, error = 3, gamedata/movedefs_classes.lua, [string "gamedata/movedefs_classes.lua"]:19: '}' expected (to close '{' at line 3) near 'heatproduced'
it crashes because your intel ram drivedriver got too hot.
you can override the shutdown by putting a , behind the depthModParams = { bla }
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: My amphibious units are afraid of water! IN 86!

Post by Forboding Angel »

Oh damnit, silly me. Thanks kloot! 5am, I'm a little bleary eyed.

Can someone add the trailing commas to the changelog so some other silly nub doesn't make the same mistake I did?
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: My amphibious units are afraid of water! IN 86!

Post by Anarchid »

trailing commas to the changelog
But isn't that just Lua syntax?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: My amphibious units are afraid of water! IN 86!

Post by Forboding Angel »

Yes, but some people copy and paste.

Especially when it's the only example available and you don't feel like typing it all over again (and really, why would you?).
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: My amphibious units are afraid of water! IN 86!

Post by smoth »

because you would see that you are pasting into a table and you are pasting a new element in the middle of others so a , is required..
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: My amphibious units are afraid of water! IN 86!

Post by Forboding Angel »

Smoth, is there a reason why you're arguing in favor of a small noobtrap? It's 2 commas guys. It won't hurt anyone if you add them. I promise.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: My amphibious units are afraid of water! IN 86!

Post by smoth »

noob trap.. seriously.. this isn't ba:dsd.

yeah they could make more complete documentation but if someone doesn't know enough to complete the commas... then odds are they have bigger lua problems.

you just missed a comma but arguing the point that it should be more noob friendly to code.. nah bruh.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: My amphibious units are afraid of water! IN 86!

Post by Pxtl »

Do you have to make *everything* into drama?

User was warned for this post. Felony 1.
~Beherith
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: My amphibious units are afraid of water! IN 86!

Post by Forboding Angel »

Me or Smoth? He's the one turning it into a big issue. I was just pointing out that so no one make the silly mistake that I did, a trailing comma should be added. Nothing major.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: My amphibious units are afraid of water! IN 86!

Post by smoth »

Pxtl wrote:Do you have to make *everything* into drama?
Do you have to make *everything* into drama?? I don't see any drama. you do.
Post Reply

Return to “Engine”