View topic - Mood is a thing for



All times are UTC + 1 hour


Post new topic Reply to topic  [ 112 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Re: Mood is a thing for
PostPosted: 22 Feb 2012, 00:54 
Journeywar Developer & Mapper
User avatar

Joined: 24 Jan 2006, 21:12
Location: There is no god - and reality is his prophetess
yep, 29 years long... surely, if you give me another year, i can get all grown up and serious buisnessmeni


ZogOP, would you be okay, if i ported your sandworm afterwards to Behes Melange? The Spice must flow, no matter if there are worms in it..


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 22 Feb 2012, 02:54 
User avatar

Joined: 07 Sep 2010, 17:47
PicassoCT wrote:
ZogOP, would you be okay, if i ported your sandworm afterwards to Behes Melange? The Spice must flow, no matter if there are worms in it..

I'm all for the flow. How can I call your swallow function with my gadget? (so continues moment of slippage) But really though, should I just put swallow in a TransportPickup callin, or is it possible to explicitly call script functions from within a gadget?

edit: i'm an idiot, i need to fix the unitdef


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 22 Feb 2012, 20:27 
Journeywar Developer & Mapper
User avatar

Joined: 24 Jan 2006, 21:12
Location: There is no god - and reality is his prophetess
Are we there, dad?

No, wait, that doesent fit the situation.
IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!
........................................................................................................................IS IT DONE YET, ZOGGOP?!IS IT
........................................................................................................................DONE YET, ZOGGOP?!IS IT DONE YET,
........................................................................................................................ZOGGOP?!IS IT DONE YET,
........................................................................................................................ZOGGOP?!IS IT DONE YET,
........................................................................................................................ZOGGOP?!IS IT DONE YET,
........................................................................................................................ ZOGGOP?!IS IT DONE YET,
........................................................................................................................ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!
IS IT DONE YET, ZOGGOP?!IS IT DONE
YET, ZOGGOP?!IS IT DONE YET,
ZOGGOP?!IS IT DONE YET, ZOGGOP?!
IS IT DONE YET, ZOGGOP?!IS IT DONE
YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!
IS IT DONE YET, ZOGGOP?!IS IT DONE
YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!
IS IT DONE YET, ZOGGOP?!IS IT DONE
YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?! IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!


....................................................................... IS IT DONE YET, ZOGGOP?!
.......................................................................IS IT DONE YET, ZOGGOP?!
....................................................................... IS IT DONE YET, ZOGGOP?!


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 22 Feb 2012, 23:45 
User avatar

Joined: 07 Sep 2010, 17:47
No. Waiting is good for you. It builds character.

The unit script doesn't seem to be getting used (and I should hope it likes to get used).
Code:
[f=0000000] Loading gadget: Lua unit script framework  <unit_script.lua>
[f=0000000]   Loading unit script: scripts/emergesworm.lua
^ this happens, yet every time I create a unit:
Code:
[f=0003600] Warning: Could not load COB script for unit "emergesworm" from: scripts/emergesworm.cob
Why is Spring looking for the COB script at all, if it found the lua script?

(emergesworm is your unit renamed, which I did for a reason, but I forgot)


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 22 Feb 2012, 23:59 
Journeywar Developer & Mapper
User avatar

Joined: 24 Jan 2006, 21:12
Location: There is no god - and reality is his prophetess
did you tell it in the unitdef to look for the script?
something like

script= NameItlikeyouwant.lua,


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 23 Feb 2012, 00:22 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
you have to specify .lua for lua unit scripts..

so script = wagarble.lua


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 23 Feb 2012, 06:16 
User avatar

Joined: 07 Sep 2010, 17:47
Quote:
IS IT DONE YET, ZOGGOP?!

Not really, but it like, does something now, and stuff. It has a 50% chance (plus 1% for every unit on the sand) to randomly eat a unit on the sand, and does so. Since you're practically jumping up and down, here's what I have so far, which is kind of lame, and causes segfaults with some AIs. I'm guessing I'll have something cooler with wormsign etc in about a week, following my omg-new-thing/who-gives-a-fuck/sucked-back-in cycle.


Attachments:
cal-sworm_testing.zip [511.78 KiB]
Downloaded 14 times
Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 26 Feb 2012, 21:15 
User avatar

Joined: 07 Sep 2010, 17:47
The worm movement lua all works, and I made a worm sign lightning effect. I'd show screenshots, but, it's lightning, so I can't really time a screenshot right. What still doesn't work is AttachUnit. I've tried putting this immediately after creating Picasso's swallowing worm unit:
Code:
Spring.UnitScript.CallAsUnit(attackerID, Spring.UnitScript.AttachUnit, 10, targetID)

(worm is attackerID)
I've also tried putting the AttachUnit call in the unit script:
Code:
Spring.UnitScript.AttachUnit(foodmagnet, idUnitToBeSwallowed)
at the top of the swallow function, which is called by:
Code:
function script.Create()

--move the worm into the position underground
Move(center,y_axis,-230,0) --Moves the worm underground Instantanously
Spin(center,y_axis,0.02,1) -- worm rotates slowly

local x,y,z = Spring.GetUnitPosition (unitID)

if (x and y and z) then
   local nearunits=Spring.GetUnitsInSphere  (x,y,z, 32) or "nothing"
   if (nearunits~="nothing") then      
      for _, nearunitid in ipairs (nearunits) do
         if (nearunitid~=unitID) then
            swallow(nearunitid)
            break
         end
      end
   end
end

end

(interestingly, simply calling AttachUnit rather than Spring.UnitScript.AttachUnit in the script results in an attempt to call a nil global error)

Both methods don't attach anything. The unit being swallowed runs away, and then disappears when swallow() destroys it.

Any suggestions?


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 26 Feb 2012, 22:18 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
AttachUnit will only work if the unit calling it has the transportCapacity tag

Quote:
simply calling AttachUnit rather than Spring.UnitScript.AttachUnit in the script results in an attempt to call a nil global error


This is because AttachUnit is not localised in the default unit script header ( https://github.com/spring/spring/blob/m ... header.lua ), due to it not being used in most scripts and there being a limited number of locals in a lua script, iirc.


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 26 Feb 2012, 23:07 
User avatar

Joined: 07 Sep 2010, 17:47
FLOZi wrote:
AttachUnit will only work if the unit calling it has the transportCapacity tag


from the worm's unitdefs:
Code:
isTransport = true,
loadingRadius = 512,
transportCapacity = 10,
transportMass = 50000,
transportSize = 10000,


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 27 Feb 2012, 00:42 
Journeywar Developer & Mapper
User avatar

Joined: 24 Jan 2006, 21:12
Location: There is no god - and reality is his prophetess
Well.. the runaway is easily fixxed.. by setting the units acceleration to zero.

http://code.google.com/p/zero-k/source/search?q=armtboat&origq=armtboat&btnG=Search+Trunk

unit that loads another unit..


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 27 Feb 2012, 07:39 
User avatar

Joined: 07 Sep 2010, 17:47
have been fiddling with the unitdef per zK's armtboat. still can't get it to attach to anything. is there some kind of uberverbose engine mode that would tell me something helpful like "AttachUnit() not allowed because ____"? or is that pie in the sky?


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 27 Feb 2012, 11:07 
Journeywar Developer & Mapper
User avatar

Joined: 24 Jan 2006, 21:12
Location: There is no god - and reality is his prophetess
lets handle this systematic, like a doctor cutting of slices of patient until the guy can be delcared healthy.

Obviously the unitdef. Some of those keywords trigger magic chainreactions, leading to other keywords beeing ignored. If you say its a boat, maxfleightheight will be ignored. So coment everything in there out, that isnt absolutly needed.

Next post infolog.


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 27 Feb 2012, 21:37 
User avatar

Joined: 07 Sep 2010, 17:47
good idea
let the culling begin


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 27 Feb 2012, 22:19 
User avatar

Joined: 07 Sep 2010, 17:47
whole damned unitdef:
Code:
return {
   sworm = {
      blocking = false,
      canmove = true,
      description = "Giant hungry beast.",
      footprintx = 6,
      footprintz = 6,
--      holdSteady = true,
      isFirePlatform = true,
--      isTransport = true,
      levelGround = false,
--      loadingRadius = 256,
      maxdamage = 9999,
      name = "Sand Worm",
      objectname = "sWorm.s3o",
      script = [[sWorm.lua]],
--      transmaxunits = [[10]],
      transportCapacity = 100,
        transportMass = 50000,
--       transportSize = 10000,
      customParams = {
          ignoreplacementrestriction = true,
      },
   },
}


will not attach. waiting for the other doctor to come take the paddles out of my hands and tell me that his pulse stopped ten minutes ago.

edit: here is infolog, but it's not terribly helpful, and mostly full of debug info from the sand worm gadget.


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 27 Feb 2012, 23:22 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
This is for a map right? What game are you testing? There are some limits to prevent loading enemy units, though I would have thought directly AttachUnit'ing the id should work.


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 28 Feb 2012, 00:32 
User avatar

Joined: 07 Sep 2010, 17:47
Right, the prevention of loading enemy units is why I'm not making the worm actually a transport and giving it load unit commands. I thought the AttachUnit thing would work because it worked for knorke's magnetic BA, which is what I used to tell me what unitdef parameters to use (magnetic BA has a thing that posts to the unitdefs before the game somehow), and how to attach units. The game I'm testing is BA 7.63.

edit: wait, the magnetic thing was only done on friendly units. maybe the no enemy unit loading test is done at an AttachUnit level? But I guess I thought in BA most units are nappable anyway. Well, to continue thinking out loud, I'll make the worms spawn on the same team as the unit they're eating, see what happens.


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 28 Feb 2012, 00:46 
Moderator
User avatar

Joined: 26 Oct 2007, 15:21
Ill gladly add an exception to no load enemy units to gaia units if you need me to.


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 28 Feb 2012, 00:56 
Journeywar Developer & Mapper
User avatar

Joined: 24 Jan 2006, 21:12
Location: There is no god - and reality is his prophetess
zoggop wrote:
Right, the prevention of loading enemy units is why I'm not making the worm actually a transport and giving it load unit commands. I thought the AttachUnit thing would work because it worked for knorke's magnetic BA, which is what I used to tell me what unitdef parameters to use (magnetic BA has a thing that posts to the unitdefs before the game somehow), and how to attach units. The game I'm testing is BA 7.63.

edit: wait, the magnetic thing was only done on friendly units. maybe the no enemy unit loading test is done at an AttachUnit level? But I guess I thought in BA most units are nappable anyway. Well, to continue thinking out loud, I'll make the worms spawn on the same team as the unit they're eating, see what happens.


knorkes magnetic mod loaded enemys and friendlys.. resulting in funny towerdefense infights.. and a full wormstomage is a full wormstomage.. shall god sort out his own..


Spring.UnitScript.AttachUnit ( piece, passengerID )
should work with transport.


Top
 Offline Profile  
 
 Post subject: Re: Mood is a thing for
PostPosted: 28 Feb 2012, 08:13 
User avatar

Joined: 07 Sep 2010, 17:47
Beherith wrote:
Ill gladly add an exception to no load enemy units to gaia units if you need me to.

Thanks, but it seems that the unit's team wasn't the problem.

Quote:
Spring.UnitScript.AttachUnit ( piece, passengerID )
should work with transport.

I agree, but um...


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 112 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.