Author Topic: The "I want to but I can't" modding requests thread  (Read 226553 times)

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
The "I want to but I can't" modding requests thread
« on: April 06, 2010, 06:02:45 PM »
If you have a request for a modding feature that isn't in the game, put it here. I will do the ones that are within reason. Things like requests for powering the UI by Lua will probably not make it in due to how hard-coded that part of the game is... but please put them down anyway if that's what you want to do. It is good for me to know what people want.

Thanks!

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #1 on: April 06, 2010, 06:06:22 PM »
Ok here's a continously updated summary of all the commands that I wish existed, in order of the importance I personally attach to them.  :P


  • DrawLineBehind() and DrawSpriteBehind() commands!  Please see the discussions on this page of the thread for details.

  • Bug Fix for mine:SendTo(Asteroid).  Currently the mine travels directly to the target asteroid, ignoring whether the send distance is big enough, and not bothering to travel via intermediary roids.
  • Bug fix for RemoveSeedlings() command, which currently only removes some of the seedlings... an apparently random number.  For example if I have 50 seedlings and try to remove 50, I might be left with 42.
  • Command to manually set the colour for a given Empire.  This would give designers greater creative control over how maps look.  If no colour is specified for the empire, a random one would be chosen.
  • Command to capture key presses, EG "if player is holding down the "R" key, move asteroid 1 by 0,50".

  • Command to trigger in-game sounds, eg the being able to trigger the 3-tone sound that is heard when you send seedlings from one asteroid to another would be helpful for player-made empire management tools like drag-selecting.
  • Command to change the radius of the "atmosphere", ie the glow around asteroids.
  • Command to move (not send) a given number of seedlings belonging to a given Empire from one asteroid to another asteroid.  More control over agents in general would open up a lot of possibilities.
  • A way to differentiate between seedlings of different qualities when referring to them in scripts.  For example, it would be nifty if you could instruct seeds with a high speed stat/best overall stats/etc to travel somewhere, instead of just "seeds in general".
« Last Edit: June 10, 2011, 12:52:33 AM by annikk.exe »

Major Cooke

  • Achiever
  • Sapling
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 57
Re: The "I want to but I can't" modding requests thread
« Reply #2 on: April 07, 2010, 02:45:40 AM »
As mentioned in another post, customizable sounds via LUA. And perhaps, if eventually allowed in another milestone marker, the ability to create custom units... or does that fall under the "powering the UI by Lua"? (I assume it is, but bleh)

Also, what about using some of the new features for the regular single player levels? I'm still working my way through them and it'd be nice to see good examples on how they are used in the story.

njursten

  • Seedling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
Re: The "I want to but I can't" modding requests thread
« Reply #3 on: April 07, 2010, 05:21:29 AM »
I like to write pretty code. This means not hard-coding numbers, for example the number of asteroids I've added, but instead retrieve it from a function or variable. From what I see there is no GetNumAsteroids function. Or is the Globals.G.Asteroids increased when you call the AddAsteroid function?

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 275
Re: The "I want to but I can't" modding requests thread
« Reply #4 on: April 07, 2010, 06:47:09 AM »
waypoints? or perhaps a small set of variables that the player can alter themselves from the main menu. eg. enemy easy/med/hard. this many opponents. change  unit cap/ world cap, etc. so you tweak things to your personal taste.

but waypoints for me is the main one..


annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #5 on: April 07, 2010, 07:57:10 PM »
If you could add something like GetCameraPositionX() and GetCameraPositionY(), and GetCameraZoomLevel(), that would be enough (I think) to be able to add pseudo-depth.
If you recall in games like Sonic the Hedgehog, Sonic runs around on the grass in the foreground and as he moves it scrolls along with him.  However, there's also a background layer of hills and mountains in the distance, and this background layer moves more slowly than the foreground - giving you the sense that the level has some depth.

With these additional functions, it would be possible to create an engine that lets you place asteroids in the "background", which move accordingly when you zoom in/out and move the view field around.  In addition you could also place asteroids at different "depths", meaning not just a foreground and background layer like in Sonic, but actually an arbitrary number of background layers, all of which move according to their depth.

To get around the issue of these asteroids being selectable and traversable, one could simply add them in function LevelLogic() instead of in LevelSetup.  That way the asteroids are visible but not traversable/selectable.


So that would be a totally awesome and unique effect.  I wouldn't get a chance to work on this for ages yet though so no rush on these - Gravity is going to keep me busy for quite some time, I think...

Rudolf

  • Administrator
  • Old Oak
  • *****
  • Thank You
  • -Given: 5
  • -Receive: 13
  • Posts: 669
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #6 on: April 11, 2010, 08:30:12 PM »
A visual level editor would be nice. :-)

Major Cooke

  • Achiever
  • Sapling
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 57
Re: The "I want to but I can't" modding requests thread
« Reply #7 on: April 12, 2010, 10:35:15 AM »
A visual level editor would be nice. :-)

With a built in run-time script editor and tester. :D

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #8 on: May 04, 2010, 11:33:31 PM »
Please please please let me name my asteroids!!



see, the game i've had, would make a good seed turn bad..
oh who am i kidding..nobody gonna get that reference :P

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: The "I want to but I can't" modding requests thread
« Reply #9 on: May 07, 2010, 08:21:57 PM »
Haven't grown a tree in a long time...

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #10 on: May 07, 2010, 11:43:31 PM »
heh

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 275
Re: The "I want to but I can't" modding requests thread
« Reply #11 on: May 08, 2010, 02:51:59 AM »
is there a way to...

... enable the roids to very gradually grow in size, and when it reaches a particular size, the tree capacity is increased by 1. i think it would work as a percentage, so once it increases by say, 50% of its initial size, add 1 tree capacity. then again at 25% of its new size, etc....

???

annikk...im looking at you here for guidance?!

 ::)

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #12 on: May 09, 2010, 12:46:27 AM »
You can change the radius of asteroids over time by changing their radius property, so yes you can do that.

If you're changing the radius over time, you could do it by having a variable called roidradius.  If you wanted to do this for all the asteroids and not just one, you could make roidradius an array.  Then you would have a slot for each asteroid.  So roidradius[0] would be the variable referring to the radius you will set for asteroid ID 0.  roidradius[1] would be the radius for asteroid ID 1, and so on.

You can change the number of tree slots an asteroid has available mid-game by changing the properties of the asteroid.  To do it based on the size, you could run a check on the roidradius.  Something like this:

Code: [Select]
for i = 0,roidnumber do
treenumber[i] = roidradius[i] / 200

GetAsteroid(i).TreeCap = treenumber
end

treenumber[] will usually end up being a non-integer, but I think LUA converts it to the closest integer automatically.


Anyway yeah this is totally possible.

This thread is for requests for new scripting commands mod features, better to take questions about level design to a new thread.  :>
« Last Edit: June 08, 2010, 10:48:30 PM by annikk.exe »

hansie

  • Guest
Re: The "I want to but I can't" modding requests thread
« Reply #13 on: May 17, 2010, 08:47:53 AM »
Could someone tell me it if's possible to get the campaign to visually look like dark matter??

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #14 on: May 24, 2010, 04:55:08 AM »
Made a proper list for this now, see my post up at the top.

Major Cooke

  • Achiever
  • Sapling
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 57
Re: The "I want to but I can't" modding requests thread
« Reply #15 on: June 16, 2010, 05:54:45 PM »
A gentle soft-as-a-kitten-nudge to implement LUA custom sound range boundaries. I don't see it on the patch to-do list.

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: The "I want to but I can't" modding requests thread
« Reply #16 on: June 17, 2010, 12:14:02 AM »
Currently picking the low-hanging fruit (easy to fix stuff), custom sounds may have to wait a bit :)

Major Cooke

  • Achiever
  • Sapling
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 57
Re: The "I want to but I can't" modding requests thread
« Reply #17 on: June 18, 2010, 11:13:22 PM »
Alright, so long as it's on the priority list somewhere. :P

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 275
Re: The "I want to but I can't" modding requests thread
« Reply #18 on: June 22, 2010, 05:26:37 AM »
i read on a thread somewhere a while ago, i dont think on this forum though, that it was possible to draw custom shapes as the centre design for asteroids. is this true? if so, how does one do that?


Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: The "I want to but I can't" modding requests thread
« Reply #19 on: June 22, 2010, 07:33:46 PM »

Sniped50

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 97
Re: The "I want to but I can't" modding requests thread
« Reply #20 on: July 17, 2010, 11:26:08 PM »
If I had to pick one thing I want implemented into LUA, I'd say that the code for telling what an empire's colour scheme is would suffice. All you would need is the line

GetEmpire(ID).GetEmpireColour(red,green,blue)

and you could do quite a few things with that. For instance, you could colour the background to match whoever's winning at that point in the game. Plus it's seems as though it should be fairly easy to implement, so I thought I'd just mention that first. More coming soon...

...hopefully.  :P

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 24
  • Posts: 932
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #21 on: July 17, 2010, 11:29:39 PM »
And, of course:
GetEmpire(ID).SetEmpireColour(red,green,blue)

Sniped50

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 97
Re: The "I want to but I can't" modding requests thread
« Reply #22 on: July 18, 2010, 08:25:25 PM »
Ha! Didn't think of that Pilchard. :)

Oh, and I've thought up another thing you could add into the code; a line stating whether an asteroid is traversable by the AI, aka, allowed to send seedlings there or not.

GetAsteroid(ID).TraversableBy(Empire ID) = true/false

Doesn't have to be worded like that, but if it is, I can take credit for it. 8)

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: The "I want to but I can't" modding requests thread
« Reply #23 on: July 19, 2010, 03:18:02 AM »
GetAsteroid(ID).TraversableBy(Empire ID) = true/false

would it easily to the place where he can not come to coordination
like this? :

Code: [Select]
GetAsteroid(ID).Traverblock( Empire ID, x, y)
or better said :

Code: [Select]
GetEmpire(ID).Traverblock( x, y)
or just :

Code: [Select]
GetEmpire(ID).Traverblock(GetAsteroid(ID))

Sniped50

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 97
Re: The "I want to but I can't" modding requests thread
« Reply #24 on: July 19, 2010, 08:23:58 PM »
Quote
would it easily to the place where he can not come to coordination like this?
Code: [Select]
GetAsteroid(ID).Traverblock( Empire ID, x, y)or better said :
Code: [Select]
GetEmpire(ID).Traverblock( x, y)

Maybe. But if it is put in there, I doubt people with gravity maps will use it becuase static x and y coordinates become moot when the asteroid in question keeps moving. Plus, it's difficult to line up your x,y coords with the asteroid you'd like to influence anyway, even when they're not moving. Like in your third suggestion, using GetAsteroid(ID) would be the simplest, easiest and quickest method of doing it.

Besides, I like my suggestion better. I can take credit for it, you see.  8)

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: The "I want to but I can't" modding requests thread
« Reply #25 on: July 19, 2010, 08:47:40 PM »
Yeah doing it by ID would be best, this sounds similar to making asteroids off-limits for certain teams too.

Accessing the team colours should be easy.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #26 on: July 19, 2010, 09:32:33 PM »

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: The "I want to but I can't" modding requests thread
« Reply #27 on: July 21, 2010, 08:11:15 PM »
then i prefer
Code: [Select]
GetAsteroid(ID).Traverblock( Empire ID, x, y)
Hmmm idd thats something....., if your use it in a gravity level
there would be some way to add on this code ect

there would be some way to add on this code :
Code: [Select]
AccelerationX[roid] = 0
AccelerationY[roid] = 0
MomentumX[roid] = 0
MomentumY[roid] = 0
density[roid] = 0
CoordX[roid] = 0
CoordY[roid] = 0
roidradius[roid] = 0

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: The "I want to but I can't" modding requests thread
« Reply #28 on: July 21, 2010, 10:13:02 PM »
Hmm we have the code
Code: [Select]
GetRandomRangeAsteroid(start, end)
but i like also to have this

Code: [Select]
GetRangeAsteroid(start, end)
because I need it so in a level :$
but is that possible?

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: The "I want to but I can't" modding requests thread
« Reply #29 on: July 21, 2010, 11:40:44 PM »
What do you want this function to do?

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: The "I want to but I can't" modding requests thread
« Reply #30 on: July 21, 2010, 11:49:04 PM »
That about that thing i am now trying to do for the CoreHealth()
then i can put it for all the asteriods in one time
if you have many asteroids will take a while
and i thing also it will useful for other things

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: The "I want to but I can't" modding requests thread
« Reply #31 on: July 22, 2010, 05:53:18 PM »
use these:

Globals.Asteroids.MinCoreHealth = 1000
Globals.Asteroids.MaxCoreHealth = 2000

Just substitute your own values instead of 1000 and 2000.

Terrial

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 66
Re: The "I want to but I can't" modding requests thread
« Reply #32 on: July 23, 2010, 02:32:14 AM »
Alex, has that intraversible function been added yet?  That could really come in handy for event orriented levels.  You could also use it for abilities, say there are asteroids 1,2,3 with one seedling on asteroid 1.  When the seedling is on #1, you could have an ability that allows you to put down a laser mine when you select an asteroid and right click in space.  The cooldown for this could be as such: when you move the seedling to the corresponding asteroid, it could start growing a defense tree, and when it hits the right level, you can use the ability again, for longer cooldown timers, a second or third defense tree could start after the first has reached it's max level.

Also, I was thinking that a function to make asteroids invisible might be nice (I don't think one exists) that makes it so that the empire cannot even tell the that asteroid is there, whereas when a roid is hidden, it just says it is undiscovered, if it is invisibible, it wouldn't even show up on the map.  I suppose this could be done by adding and removing roids in the game, but having a function might be more convenient. Just kidding, you already have this one

And finally, can you allow it so that asteroids do not all have to link up?  like say 2 asteroids are linked, but are disconected from the rest of the secter?  I tried to make a level like that and it refused to load.
« Last Edit: July 24, 2010, 02:57:53 AM by Terrial »

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: The "I want to but I can't" modding requests thread
« Reply #33 on: July 23, 2010, 07:50:19 AM »
thx alex :)

do you explain a bit or anyone else what this is?

Globals.Asteroids.MaxVolume (int)
Globals.Asteroids.TakeoverVolume (int)
Globals.Asteroids.RadiusPowerRule (float)
Globals.Asteroids.SizeFromEnergy (float)
Globals.Asteroids.SizeFromStrength (float)
Globals.Asteroids.SizeFromSpeed (float)
Globals.Asteroids.AttributeMinimum (float)
Globals.Asteroids.AttributeDivisions (int)
Globals.Asteroids.SendVolume (int)
Globals.Asteroids.AsteroidSelectRadius (int)
Globals.Asteroids.SendPowerRule (float)

it comes from : http://www.dyson-game.com/smf/index.php?topic=212.msg1864#msg1864

Terrial

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 66
Re: The "I want to but I can't" modding requests thread
« Reply #34 on: July 23, 2010, 07:51:47 AM »
yeah i want to know what the core power and just the ones in general that say power

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: The "I want to but I can't" modding requests thread
« Reply #35 on: July 26, 2010, 09:27:22 PM »
Alex, has that intraversible function been added yet?  That could really come in handy for event orriented levels.  You could also use it for abilities, say there are asteroids 1,2,3 with one seedling on asteroid 1.  When the seedling is on #1, you could have an ability that allows you to put down a laser mine when you select an asteroid and right click in space.  The cooldown for this could be as such: when you move the seedling to the corresponding asteroid, it could start growing a defense tree, and when it hits the right level, you can use the ability again, for longer cooldown timers, a second or third defense tree could start after the first has reached it's max level.

Also, I was thinking that a function to make asteroids invisible might be nice (I don't think one exists) that makes it so that the empire cannot even tell the that asteroid is there, whereas when a roid is hidden, it just says it is undiscovered, if it is invisibible, it wouldn't even show up on the map.  I suppose this could be done by adding and removing roids in the game, but having a function might be more convenient. Just kidding, you already have this one

And finally, can you allow it so that asteroids do not all have to link up?  like say 2 asteroids are linked, but are disconected from the rest of the secter?  I tried to make a level like that and it refused to load.

Intraversible hasn't yet been added. It seems like a good idea though and I will add it.

Asteroids not linking up - if you add asteroids at the start of the LevelLogic function now, it should be OK. So try that - they won't automatically link in to the network.

thx alex :)

do you explain a bit or anyone else what this is?

Globals.Asteroids.MaxVolume (int) - this value affects the sound of the asteroid's humming, and also the volume of the Great Galactic Hum (the noise you hear when really zoomed out).
Globals.Asteroids.TakeoverVolume (int) - volume of the sound effect played when the asteroid is taken over.
Globals.Asteroids.RadiusPowerRule (float) - This value affects the size of an asteroid relative to its stats. You can check this using the graphs window (in debug mode, F3, then click "Asteroid Size")
Globals.Asteroids.SizeFromEnergy (float) - see below
Globals.Asteroids.SizeFromStrength (float) - contribution to asteroid size from stats (so max asteroid radius is these three added together (proportionally to the asteroid's attributes so e.g. if strength was 0.5 then you'd get half of the radius value from strength) and subject to the power rule, then subject to the global asteroid max radius)
Globals.Asteroids.SizeFromSpeed (float) - see above
Globals.Asteroids.AttributeMinimum (float) - the minimum value for an asteroid's attributes (so if this is set to e.g. 0.1 then no asteroids generated pre-game will have <0.1 for strength, speed or energy)
Globals.Asteroids.AttributeDivisions (int) - number of divisions in asteroid stats - so if this is 3, there will only be three possible asteroid stats values - 0, 0.5 and 1 (all subject to the attribute minimum above)
Globals.Asteroids.SendVolume (int) - volume of the effect played when you send seedlings around.
Globals.Asteroids.AsteroidSelectRadius (int) - radius below which asteroid near the cursor become selectable.
Globals.Asteroids.SendPowerRule (float) - sending distance of the asteroid is based on a similar rule to the asteroid's size - this is the power rule that governs the send distance. IIRC the formula is (minsend + (pow((radius / (max radius - min radius)), sendpowerrule) * (maxsend-minsend)))

it comes from : http://www.dyson-game.com/smf/index.php?topic=212.msg1864#msg1864

yeah i want to know what the core power and just the ones in general that say power
See above and the graph window - they govern the various rules that set attributes and various other bits and bobs in the game. Have a play with the values and see what happens to the graphs.
« Last Edit: July 26, 2010, 09:42:34 PM by Alex »

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: The "I want to but I can't" modding requests thread
« Reply #36 on: July 27, 2010, 05:57:23 AM »
Coool thx alot buddy :o

I have some questions about the asteroids

  • About that last quote
is it also for useing specific asteroids?

  • About the img :d (See attach )
in the drawing there are two things we certainly know
that is :
-SendDistance
-Radius of the asteroid and to set is it : SetRadius( 0 - ∞ ?? )

But what is that other? Thing, is that a belt?
has anything to do with this?

get_BeltRadius -- code for that green line?
set_BeltRadius -- code for that green line?
get_BeltWidth
set_BeltWidth

I had found it in that list
en als het mogelijk is hoe kan je deze dan aanpassen?

Bonobo

  • Achiever
  • Old Oak
  • ****
  • Thank You
  • -Given: 139
  • -Receive: 12
  • Posts: 670
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #37 on: July 27, 2010, 06:05:24 AM »
I had found it in that list
en als het mogelijk is hoe kan je deze dan aanpassen?
if I may translate … “ [..] and if this is possible then how can I adjust these?”

</brag>

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: The "I want to but I can't" modding requests thread
« Reply #38 on: July 27, 2010, 06:45:44 AM »
:o omg xD oeps, sorry about that i forget that last sentence xD to talk in english
i was thinking and typing to together that why it was in dutch xD

if I may translate … “ [..] and if this is possible then how can I adjust these?”
</brag>
[/quote]

That is totally corect!

Bonobo

  • Achiever
  • Old Oak
  • ****
  • Thank You
  • -Given: 139
  • -Receive: 12
  • Posts: 670
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #39 on: July 27, 2010, 07:24:46 AM »
Hehe, thanks; something like 30 years ago I learnt en beetje Nederlands at university. But I was too lazy to learn vocabulary, so I there are only a few bits left, yet now I have the advantage of living in the Lüneburg Heath in the North German flatlands, where “Low German” still is spoken among elder rural folks … plus I learnt Englisch (and Malayalam) with 4 and the English, Nederlands/Dutch/Vlaams and German languages are closely related, so it’s quite easy for me.

Anyway, linguists call this unconscious switching between languages “code switching”. If you’re among polyglots you can even trigger this by switching language yourself, and often the other person won’t notice they’re also switching.

OK, enough [OT] ;) I am somewhat infamous for going astray :-!

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #40 on: July 27, 2010, 07:40:47 AM »
Alex, I really want 10,000 seedlings.  :>  Is this an easy change?

Terrial

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 66
Re: The "I want to but I can't" modding requests thread
« Reply #41 on: July 27, 2010, 11:46:20 AM »
Alex, I really want 10,000 seedlings.  :>  Is this an easy change?

Speaking of which, is there a way to cap the player form amassing a huge number of seedlings so that the AI can still build its own without being capped by the player's massive army taking up all the 4,000 limit?

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #42 on: July 28, 2010, 10:49:09 PM »
That's an awesome idea :>

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: The "I want to but I can't" modding requests thread
« Reply #43 on: July 29, 2010, 06:13:49 PM »
I think that's better yes - limit each empire to a number of seedlings rather than drawing from a common pool until they're all used up.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #44 on: July 30, 2010, 12:28:52 AM »
So will the overall number of seedlings allowed in a level rise at all?
4000 really isn't that much... :P

There has to be a limit I guess, to avoid accidentally adding a million seeds and crashing the game/computer.  Every computer I've played Eufloria on has had no problems at all rendering 4000 seedlings with good fps.  Would it be possible to set it to 4000 seedlings per empire, maybe?  Or 10,000?

This would open up the possibility of creating levels on a much more epic scale.

Jeheace

  • Seedling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 33
New flower!
« Reply #45 on: August 03, 2010, 03:52:39 PM »
Perhaps this has been suggested, but if not then mayhaps someone might add a new type of dyson flower...

One that allowed you to improve an asteroids stats... their power, speed, and energy... perhaps increase in size even...

Terrial

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 66
Re: The "I want to but I can't" modding requests thread
« Reply #46 on: August 12, 2010, 05:00:05 PM »
I came up with an interesting idea.  What if some one (Like everyone else, I'm looking at you annikke haha) made an engine to alter time? For instance, seedlings would stop moving in a region where the time warp is occurring.  Seedling and tree growth would also stop (This part still needs Alex to make a way to alter existing tree properties).  These time warps could randomly occur and disappear on the map and would make for some interesting levels.

Another idea is if there were a way to move seedlings instantly across the map, similar to the time warp, spacial warps would occur randomly and move all of the seedlings to a different asteroid.

If these two are combined, it would make for a most chaotic and interesting level.

Sniped50

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 97
Re: The "I want to but I can't" modding requests thread
« Reply #47 on: August 12, 2010, 09:02:18 PM »
Hmmmm. Interesting ideas, Terrial.

I'm not annikk (obviously :P), but I can tell you I don't think the time warp is possible. It would involve calculating each asteroid's time state, each tree's time state, each seedling's time state, etc. Then you'd have to figure out a way of altering those time states through Lua. Of course, if temporal warps are possible, then having them randomly appearing on the map could easily unbalance the level in someone's favour, or it could utterly mess up the orbits of any asteroids that use gravity.

I can also tell you that the spacial warp is most definitely possible, but again, will have the tendency to give one side the advantage over another if they randomly occur.

They were good ideas though. If annikk can get them working, then that would be cool. Besides, I didn't predict the gravity engine now, did I? ;D

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #48 on: August 15, 2010, 08:29:00 AM »
Well lets see... you could adjust the speed of seedlings around particular asteroids, and slow the growth of trees and flowers on that asteroid...  you could slow the movement of defense tree missiles, and various other things.
That would produce a pretty convincing time-slowing effect.  Seeds arriving at the asteroid would appear to slow down, combat would be conducted at a more sedate pace, and they would remain slow until they reach another asteroid that operates on "normal time".  Or "fast time".

You could program in seasonal time fluctuations and alter the background colour to indicate the different positions in the cycle.

Lots of other possibilities to this as well, like time speeding up in certain areas as the different factions acquire more seedlings.



The problem is that there is no way to select seedlings for scripting.  There is no GetAsteroid(0):GetSeedlings(faction,number) command.  There is no GetSeedlings(faction,number,X1,Y1,X2,Y2).  This means that currently we are limited to changing the speed of asteroid properties only, which completely does not work for a timebending effect.

This highlights the need for greater seedling control.. :>

Mihhaelo

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 67
Re: The "I want to but I can't" modding requests thread
« Reply #49 on: October 31, 2010, 10:16:41 PM »
Quote
The problem is that there is no way to select seedlings for scripting.  There is no GetAsteroid(0):GetSeedlings(faction,number) command.  There is no GetSeedlings(faction,number,X1,Y1,X2,Y2).  This means that currently we are limited to changing the speed of asteroid properties only, which completely does not work for a timebending effect.

I'm not sure how useful the following is, you're welcome to play around with it.

This will give you a table of seedlings at Asteroid(n).
Code: [Select]
b = GetAsteroid(n):Seedlings(playernumber)
If you want a specific seedling you can use...
Code: [Select]
b = GetAsteroid(n):Seedlings(playernumber)[0]
Likewise, the same applies to flowers and mines. Probably better to use than the random function.
Code: [Select]
b = GetAsteroid(n):Flowers()
b = GetAsteroid(n):Mines()

I'm not sure how to refresh/update seedling changes. If it's possible to do, then a timebending map would be quite easily. Although the effects would have to be localised, otherwise the code would run a tad slow.

Quote
A way to differentiate between seedlings of different qualities when referring to them in scripts.  For example, it would be nifty if you could instruct seeds with a high speed stat/best overall stats/etc to travel somewhere, instead of just "seeds in general".

There are two functions that might be able to do this.

GetAsteroid(n):GetSeedlingsWithAttrib(num,EmpireID)
GetAsteroid(n):GetNumSeedlingsWithAttrib(num,EmpireID)

I've not figured out what the first number does quite yet. I think these are probably used when you double click planets to send stronger seedlings. I think these are the corresponding globals... someone should have a play around with it, to see if they can figure it out.

Globals.Agents.SendThresholdStrength = 0.6
Globals.Agents.SendThresholdEnergy = 0.6
Globals.Agents.SendThresholdSpeed = 0.6

Quote
If I had to pick one thing I want implemented into LUA, I'd say that the code for telling what an empire's colour scheme is would suffice. All you would need is the line

GetEmpire(ID).GetEmpireColour(red,green,blue)
I figured out a way of doing this the other day, when the colour settings on my lastest map didn't work.

Here's an example map. Keep in mind that the function used, requires an actual leaf to function. So if you are using it to draw, you'll have to put a one second delay into the LevelDraw function. The two couroutine.yields are at the start of the code to give the tree's time to spawn leaves as well.

Code: [Select]
function LevelSetup()
   Globals.G.Asteroids = (0)
Globals.G.EnemyFactionsMin = (0)
Globals.G.EnemyFactionsMax = (0)
Globals.G.MinAsteroidSeparation = (0)
Globals.G.MaxAsteroidNeighbourDist = (20000)
Globals.G.GreysProbability = (0)

Globals.Asteroids.MinSendDistance = (12000)
Globals.Asteroids.MaxSendDistance = (12000)

   a= AddAsteroidWithAttribs(0,0,1,1,1)
a.Owner = 1
for n=1,4 do
    s = a:AddDysonTree()
    s:LevelUp()
    s:LevelUp()
    s:LevelUp()
end
a:Reveal(1)
a:AddSeedlings(40)

end

function LevelDraw()
   if GetGameTime() > 1 then
      for n=0,(GetNumAsteroids()-1) do
         if GetAsteroid(n).Owner == 1 then
            x, y, r = GetAsteroid(n).position.x, GetAsteroid(n).position.y, GetAsteroid(n).Radius
          DrawSprite(5, x,y, playercolour.r,playercolour.g,playercolour.b,0.99, r * 1.15)
         end
      end
end
end

function LevelLogic()
   coroutine.yield()
coroutine.yield()
playercolour = GetAsteroid(0):GetRandomTree():GetLeafColour(0)

   Display = 1
   while GameRunning() do
   coroutine.yield()
end
end

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #50 on: January 12, 2011, 10:15:38 AM »
I discovered a problem today that I've not run into before.
I can't seem to set the "CurrentEnergy" property of a Mine.  I can read what the value is, but I can't actually change it.


Code: [Select]
playermine.CurrentEnergy = playermine.CurrentEnergy + 1
Does not work.  :/  Returns an error "property set method not found".

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: The "I want to but I can't" modding requests thread
« Reply #51 on: January 12, 2011, 07:23:28 PM »
Hmm, I guess you could set up or use a dummy entity like a seedling of a certain type (e.g. created on an asteroid with known attributes), and call Mine:AttackedBy(seedling) multiple times until the energy is somewhere near where you wanted it.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #52 on: January 12, 2011, 07:26:57 PM »
What does "AttackedBy" do?  The reference says it tells the entity it was attacked by the one passed in.  Ok, so it knows it was attacked...what does it do in response to that information?  :>

I'm looking for a way to make a mine's energy tick up over time, healing it without the need to replace the mine with a fresh, uninjured one.

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 24
  • Posts: 932
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #53 on: January 13, 2011, 12:11:33 AM »
playermine.Attribs.Energy might work. Or not, I don't know, will test.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #54 on: January 13, 2011, 12:37:37 AM »
Nope, been using that a lot already and it governs the Energy stat of the entity (as opposed to the "CurrentEnergy", which refers to core health or just health).

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 24
  • Posts: 932
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #55 on: January 13, 2011, 12:51:30 AM »
Ah. I couldn't get it to work. That's probably why.

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: The "I want to but I can't" modding requests thread
« Reply #56 on: January 13, 2011, 01:06:29 AM »
Everything in the game heals. Call Regen(t) where t is usually a frame time.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #57 on: January 13, 2011, 01:59:38 AM »
Returns an error, "attempt to call method 'Regen' (a string value).

The line I'm using is:

Code: [Select]
playermine:Regen(0.5)

Where "playermine" refers to a laser mine belonging to Empire 1.

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: The "I want to but I can't" modding requests thread
« Reply #58 on: January 13, 2011, 06:22:34 PM »
Ah, oops. It's not a public method, sorry. I don't think I can help you :(

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #59 on: January 13, 2011, 06:48:19 PM »
Ok no worries.  Would have been nicer if I could regen injured mines in a slow and steady fashion, but 1 big jump (from replacing the mine with a fresh one) works ok too.  :>

Avaguard

  • Seedling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 40
Re: The "I want to but I can't" modding requests thread
« Reply #60 on: January 30, 2011, 06:23:29 PM »
so can u at all  change hoe a seed looks i no that u cant but heck might as well ask :P

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #61 on: January 31, 2011, 04:12:23 AM »
Well, the appearance of seedlings is governed by the asteroid where they were "grown".  :>

So if an asteroid had lots of energy, the seedlings will be physically large, with large bodies.
An asteroid with high energy yields seedlings with long noses.  :>
Finally, seedlings with high speed have larger wings.


As for changing the properties of an existing seedling, that is something I've been meaning to figure out.  I think someone posted a way to access a matrix of seedlings...the rows were asteroids, and the columns were the seedlings present at that asteroid.  I'm not really sure though, it requires more investigating.  Feel free to dig in if it interests you!  They say you should learn to walk before you run, but that's a load of garbage.  You just need something to run toward.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #62 on: January 31, 2011, 04:17:37 AM »
PS:  I haven't tested it, but I believe this command may add a ridiculous looking "pinocchio" seedling.  :>


Code: [Select]
GetAsteroid(0):AddSeedlings(1,1,1,100,1)

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #63 on: February 02, 2011, 06:25:42 AM »
Alex,

I really need to be able to choose whether stars are rendered in front of, or behind, asteroids.

At the moment the 3D Starfield engine involves large overheads checking whether any asteroids are in the way of any stars.  Consequently, when lots of asteroids are onscreen, the framerate of the game plummets.

I have gone to some pretty crazy lengths to optimise it, I'm using local variables wherever I can and I've even implemented cheap single-dimension and bounding box checks to try first.  I break my loops whenever possible.  After poring over it for hundreds of hours I am convinced there are no further inefficiences in the algorithm.  It's absolutely the most lean and efficient it can be....There's just... I can't really push it any further.


My tests show that if I don't bother hiding stars behind asteroids, the code runs MUCH faster.  It's because all the onscreen stars don't have to be checked against all the onscreen asteroids.  Indeed, it's no longer even necessary to make a list of visible asteroids...but the main difference I believe comes from getting rid of that huge nested loop.

So if it was possible for me to specify whether leveldraws appear in front or behind asteroids (ie, are the asteroids drawn first, or are the drawings?), I could instantly optimise the engine to have thousands of stars and run smoothly no matter how many asteroids there are in the level.  It would be utterly transformative for my engine.

I realise you are super busy and this can all totally wait.  However, this is something I really want.  So if you get round to doing more updates/bug fixes/whatever at some point, please consider doing this!
« Last Edit: February 04, 2011, 05:31:38 AM by annikk.exe »

Widget

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 97
Re: The "I want to but I can't" modding requests thread
« Reply #64 on: February 02, 2011, 07:52:49 PM »
I think I'm speaking for many people when I say annikk's not the only one who really wants it. I certainly find his parallax stars magical and would love to see the limits of what can be done with them  :)

Mihhaelo

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 67
Re: The "I want to but I can't" modding requests thread
« Reply #65 on: February 14, 2011, 03:54:30 AM »
I doubt it's what you were wanting, but attached is a bit of script i just made up that should demontrate a method to make seedlings, flowers and mines look a little different. It should be random, so if you reload, they should look different each time, although they're isn't a huge amount of variety available. If you have any questions, you're free to ask, but i'm extremely forgetful, so I can't promise the reply will be fast.

I was actually going to make a tower-defense map and use this method to change how the seedlings look, so each wave of the enemy looked different. I managed to make a nice UI system as well, whereby you had an energy bar, you could create asteroids with energy, and also grow tree's wherever on the asteroid you wanted. Unfortunately ran into a few problems with the defense tree's recognising the enemy and all the work-arounds were less than pleasing (for myself), so i gave up.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #66 on: February 14, 2011, 08:35:58 PM »
Quote
Alex,

I really need to be able to choose whether stars are rendered in front of, or behind, asteroids.

Further to this, I've spent some additional time thinking about exactly what sort of functionality would fulfill my goals for the Starfield engine, whilst also giving maximum flexibility and extensibility for future drawing designs by myself and other designers.

As the 3D Starfield Engine has support for stars that are rendered in front of the asteroids as well as behind, I would ideally need to be able to choose whether they are drawn in front or behind asteroids on a per-draw basis.  As opposed to making the entire LevelDraw function always in front or always behind.

Here is my idea.  Rather than changing the existing DrawSprite command and breaking all existing levels that use it, how about implementing  a brand new DrawSprite command entirely, perhaps like this:


Code: [Select]
DrawSpriteBehind(int id, x,y, r,g,b,a, size)
Please note that this would need to work in ScreenDraw as well as LevelDraw!  Parallax draws to LevelDraw, the 3D Starfield Engine draws to ScreenDraw (to avoid the native scaling when the camera scale changes).


The addition of this command would be transformative for both Parallax and the 3D Starfield.  It would allow a huge number of stars to be rendered (i estimate about 1000 onscreen at any given time) and the framerate would not slow down when a large number of asteroids are onscreen.
That would then mean you could zoom all the way out, and the stars would still be visible without significantly dropping the framerate.

This change would make the difference between "pretty" and "spectacular".  I realise you're busy with PSN stuff now, which I completely agree is more important than this request, and it may be months before you finally read this, but I'm just writing it all down now while it's fresh in my mind.  :>

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #67 on: February 23, 2011, 01:16:39 AM »
I would like what annikk is desiring too, been thinking of a cool background feature :)

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #68 on: March 04, 2011, 09:11:57 PM »
But when you make DrawBehindroids... you can simply add layers(it's maybe easier said than done though...).

Normally you have:
Code: [Select]
Drawsomething(id,x,y, r,g,b,alpha,size)or alike, but if you just add a layer number before the id(in some cases x) then layer 0 might be infront of roids, 1 behind and then 2 behind 1, etc...

Get it? :)

EDIT: Got big plans for this, making some fancy backgrounds...
« Last Edit: March 04, 2011, 09:22:52 PM by Aino »

Mihhaelo

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 67
Re: The "I want to but I can't" modding requests thread
« Reply #69 on: April 11, 2011, 06:38:22 PM »
Call me crazy, but couldn't you simply do a distance check on the asteroid, and simply fail to draw the sprite behind said asteroid? I'm not sure why alex would waste his time writing a function that you could simply implement yourself.

If it's too CPU hungry, you could simply make your own coroutine or have it on a timer.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #70 on: April 11, 2011, 06:49:29 PM »
Mihhaelo, that is basically what the Starfield engine does at the moment.
It takes each star and compares it against each asteroid, until it has checked it against all the asteroids or it detects an overlap.
For overlap detection, first it checks for an X-coordinate overlap.  If there is no x-coord overlap, the star cannot possible be overlapping with the asteroid.  But if it finds one, it then checks for a Y-coordinate overlap, giving an effective bounding box check.  If the bounding box check indicates no overlap, the star cannot possibly be overlapping with the asteroid.  However, if there is a bounding box overlap, it does a full overlap check.  If overlap is then confirmed, the star is not rendered.  The one-dimensional checks are much cheaper than a real check, so we try to rule out the need for a real check in as many instances as possible... for efficiency reasons...

We HAVE implemented it ourselves, but doing it in Lua is not efficient enough.  Have you even seen the 3D Starfield engine? :>  I've spent hundreds of hours on this problem...


Quote
If it's too CPU hungry, you could simply make your own coroutine or have it on a timer.

If you have any information that could lead to further optimization of the 3D Starfield Engine, I'd be very interested to hear about that!  Please elaborate.
« Last Edit: April 11, 2011, 06:56:08 PM by annikk.exe »

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #71 on: April 11, 2011, 07:23:01 PM »
Yo annikk, where you been man?

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #72 on: April 11, 2011, 08:22:36 PM »
Hiding under a rock :>

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #73 on: April 11, 2011, 09:26:48 PM »
Ok... Been very silent without you here it seems... Maybe someone talking once a while(except me, I talk alll the time xD)...

Mihhaelo

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 67
Re: The "I want to but I can't" modding requests thread
« Reply #74 on: April 12, 2011, 09:25:09 AM »
Well as I stated, you could create your own coroutine. You could then use os.clock to enforce a limit to how much cpu time a specific part of your code is using. Since you're using a coroutine, next time you call it, it'll pick up from where you left off.

http://lua-users.org/wiki/CoroutinesTutorial

There's a tutorial.

Also (and i realise this is a less elegant solution)... But if you coloured your asteroids in team colours with an alpha setting of "1", you don't even need any checking code :P

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #75 on: April 12, 2011, 02:37:41 PM »
Is it me or Annikk you talk to ?

Caue the game is not CPU hungry atleast how I see it, but I can try... first I need to go to school...

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #76 on: April 13, 2011, 08:44:21 AM »
From the tutorial:

"Coroutines in Lua are not operating system threads or processes."
"Coroutines are a way to express multiple cooperating threads of control in a convenient and natural way, but do not execute in parallel, and thus gain no performance benefit from multiple CPU's."

Seems to indicate this won't improve matters..

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: The "I want to but I can't" modding requests thread
« Reply #77 on: April 13, 2011, 08:53:58 AM »
Quote
You could then use os.clock to enforce a limit to how much cpu time a specific part of your code is using. Since you're using a coroutine, next time you call it, it'll pick up from where you left off.

I've tried something similar to that, using an "If" statement triggered by an alternating boolean variable to run the overlap checking every second pass (so 30 out of the 60 passes per second trigger the code - odd passes trigger an overlap check, even passes do not).  The result was that 1 frame was laggy and the next frame was fine, leading to an awkward and unpleasant stuttering effect.  I messed around with different settings for a while before eventually concluding that approach was unworkable.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #78 on: September 04, 2011, 05:30:07 PM »
I wonder, whhy didn't A&R add "DrawImage(Image Location, x,y, Red overlap, Green Overlap, Blue Overlap, Alpha, Size)?

I just learned that you have the Graphics component in C#, and it can draw Images, why not just add a function that uses that function?

I'm soon gonna make my first game BTW, C# is increadibly easy to handle, but Microsofts Visual C#'s  error handling suck...

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #79 on: November 01, 2011, 09:22:10 PM »
Hi and welcome to the forum :)

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 24
  • Posts: 932
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #80 on: November 02, 2011, 01:59:11 AM »
I think that's a spambot. I've deleted all his/its posts, but feel free to tell me otherwise. In fact, please do, we need more people around here!

Andrew, what's 25 + 4?

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #81 on: November 02, 2011, 04:38:00 AM »
[random joke]Pilchard, make some easier questions for the spambots, they will fail on their exams otherwise :/[/random joke]

Bonobo

  • Achiever
  • Old Oak
  • ****
  • Thank You
  • -Given: 139
  • -Receive: 12
  • Posts: 670
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #82 on: November 02, 2011, 05:04:29 AM »
@Pilchard: What made you think he’s a spambot? Where there the usual odd links in signature or profile? I just faintly remember having seen one or two posts and can’t remember to have seen a link there … otherwise I’d also have deleted them (and the acct too).

IMHO it would be nice if we—the folks who have the license to kill spammers— could meet in an internal (i.e. closed) board …

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 24
  • Posts: 932
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #83 on: November 03, 2011, 02:09:56 AM »
The posts didn't fit their context. The first post (was above) was the only plausible one, and it was in the middle of a thread with no mention of the content of the thread. They all were generic looks-quite-human-but-isn't-really posts. The second two were double-posted and they didn't even make sense. Like I said, I hope it's not, perhaps I was being a little over-cautious.

And Aino, the question is deleberately easy. It's simple enough that anyone could answer it, but it's not in a place that bots would expect to find a question, so probably wouldn't answer it.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #84 on: November 03, 2011, 03:20:39 AM »
Pilchard, note the [random joke] brackets :P

DIV

  • Seed
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
Re: The "I want to but I can't" modding requests thread
« Reply #85 on: April 30, 2012, 10:46:42 PM »
Hello everyone! I need your help. I want to test my new map, but i cant. I see only my first start asteroid. I want to see all map, with all asteroids, with all enemies. Thank you. Sorry for my bad English.

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 30
  • Posts: 205
Re: The "I want to but I can't" modding requests thread
« Reply #86 on: May 01, 2012, 02:07:17 AM »
Hello everyone! I need your help. I want to test my new map, but i cant. I see only my first start asteroid. I want to see all map, with all asteroids, with all enemies. Thank you. Sorry for my bad English.

As far as I know...

There are several ways of doing this. If you only want to see all of the map while you are testing, I would use the Developer's Mode. After you've loaded the map, hit the "Control" and "D" buttons simultaneously. Then, you can access the "F1-F12" keys for further options. If you hit the "F4" key, you will see further options. Select the "Limit Camera" option and you will be much less constrained in your camera views. Here, you can also select which Factions to view. Hit "F4" again to close the menu window. This should be adequate for your testing requrements, but...

If you want to see more of the map, or want the actual gameplay to show more of the map initially, then you will have to add specific commands to your map code.

DIV

  • Seed
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
Re: The "I want to but I can't" modding requests thread
« Reply #87 on: May 01, 2012, 02:30:10 AM »
Thank you very much  :)

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 30
  • Posts: 205
Re: The "I want to but I can't" modding requests thread
« Reply #88 on: September 08, 2015, 02:40:30 PM »
From Sillytuna:
Quote
The current Eufloria (RPG) work is -heavily- moddable. Still quite a bit to do on that front but I'm looking forwards to seeing what people can do.

If you want future versions of Eufloria to be long-lived due to interest from a modding-community, I suggest greater effort be made in documenting and explaining all scripting functions, and particularly the drawing functions available. Documentation such as this thread:

http://www.euflorium.com/index.php?topic=212.0

were extremely helpful. The less time modders have to spend experimenting the more time they will have in developing new maps. It seems many of the most successful games seem to have a thriving modding community keeping them fresh and alive.

I know it's been talked about in the past, but a more organized one-stop shop for uploading and downloading user-made maps would be helpful.

As for specific requests, in addition to many of the suggestions already made on this thread, I would like the ability to "read" a file without the player having to go into the lua code and make modifications. For example, if I create a map with a write-text-to-a-file function, the same map should have the ability to then read-the-text-file the next time it is run. This would enable the player to save information from one session to another- like configurations, statistics, or whatever variables I choose.

I would also like the ability to use color in a DrawText function, as well as control how text, or any drawing function for that matter, is layered over or under other drawings or asteroids. I don't know how that works but I assume there is some sort of hierarchical assignment given to a drawing command determining it's level of visibility in front of or behind other objects/drawings.


sillytuna

  • Eufloria lacky
  • Administrator
  • Arboreal Being
  • *****
  • Thank You
  • -Given: 58
  • -Receive: 71
  • Posts: 441
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #89 on: September 29, 2015, 12:21:02 AM »
ERPG will be fully documented. A small amount can be seen in draft level here:

https://github.com/sillytuna/eufloriarpg-docs

(clone or download as a zip)

That'll be massively updated at the end of October and the updated repo will include the Slate build tools so you can easily fork them. We're discussing whether to release a kind of blank version of the build to allow people to experiment with the modding once I've got things working in Unity 5. I'm a little hesitant as there are still some big changes ahead of us and I don't want to screw people over, but it'll be fun to see what people can do with things like programmatic animation as long as they understand that the modding side has many pending changes.

Note - modding is Lua based and through config files. No need to use Unity. No editors as yet.

This code below animates the green mines shown in the video. Note that Eufloria sprites are layered set of shape elements, and each element is positioned/sized/distorted based on the entity's attributes. Animation can then make further amends live. Complex sprites and animation are in depth topics but you can get great results. Other people will just create sprites with a single basic texture quite happily.



function ParameciumMineUpdateHandler(entity, time)
   -- Update
   --
   --

   -- Animation
   --
   -- STEP 1
   --
   -- Get the SpriteDef since that has our basic size information
   --
   -- We can use any of the following to get the relevant layers/elements:
   --
   --      local layer = entity.spriteDef:GetLayer("Body")
   --      local element = entity.spriteDef:GetElement(layer, "Body_1")
   -- or in one call:
   --      local element = entity.spriteDef:GetLayerElement("Body", "Body_1")
   --
   -- However, we can just work with the sprites we created, so can assume body and element orders
   -- which is much faster. The layers and elements are in lists:
   --      layer = entity.spriteDef.layers[<index>]
   --     element = layer.elements[<index>]

   local spriteDef = entity.spriteDef

   local elementUpper = spriteDef:GetIndexedLayerElement(0, 0)
   local elementLower = spriteDef:GetIndexedLayerElement(0, 1)

   local radiusUpper = elementUpper.baseWidth / 2
   local lengthUpper = elementUpper.baseLength

   local radiusLower = elementLower.baseWidth / 2
   local lengthLower = elementLower.baseLength

   -- STEP 2
   --
   -- Get the sprite instance. This is the sprite that is rendered, not the original definition.
   -- This has a *different* format since it's a processed version that essentially output the resulting
   -- polygon information.
   --
   -- Changing the original SpriteDef will be permanent (per level) and will affect all sprites
   -- using that SpriteDef as this is not instanced. If this is done, for the change to have an effect:
   --
   -- Immediate on this sprite:
   --      entity.ProcessSprites()
   --
   -- From the next frame on this sprite:
   --      entity.spriteInstanceDirty = true
   --
   -- If all sprites using the SpriteDef need to use it, they all need their dirty flag set.
   --
   -- Alternatively - change the SpriteDef, process the sprite, then change the SpriteDef back again.
   -- This prevents long term side-effects and may be needed where more complex changes are used.
   --
   -- We can use any of the following to get the relevant layers/elements:
   --
   --      local rawLayer = entity.spriteInstance:GetRawLayer("Body")
   --      local rawElement = entity.spriteInstance:GetRawElement(rawLayer, "Body_1")
   -- or in one call:
   --      local rawElement = entity.spriteInstance:GetRawLayerElement("Body", "Body_1")
   --
   -- However, we can just work with the sprites we created, so can assume body and element orders
   -- which is much faster. The layers and elements are in a list/array:
   --      rawLayer = entity.spriteInstance.rawLayers[<index>]
   --     rawElement = rawLayer.rawElements[<index>]
   --

   local spriteInstance = entity.spriteInstance

   local rawElementUpper = spriteInstance:GetIndexedRawLayerElement(0, 0)
   local rawElementLower = spriteInstance:GetIndexedRawLayerElement(0, 1)
   local rawElementLight = spriteInstance:GetIndexedRawLayerElement(1, 0)

   -- STEP 3
   --
   -- The following attributes can be changed in a raw element, which is effectively the rendered polygon:
   --
   --      Vector2 hotspot
   --      float radius
   --      float length
   --      float angle
   --      float angle2 - used by Nose
   --      Color colour1
   --      Color colour2
   --      float offset
   --      float extension - used by ExtendedLine
   --
   -- Which of these attributes have an affect depends on the type of element being rendered.
   --

   local data = entity.data

   -- Get the current point in the animation
   local animationLength = data.animationLength
   local time = App.game.levelTime + data.animationOffset
   local t = time - (math.floor(time / animationLength) * animationLength)

   -- Sine pulse
   local minScale = 1

   local scale = math.sin((t * math.pi * 2)/animationLength)
   local finalScale = (minScale ) + (scale * 0.2)

   rawElementUpper:SetRadius(radiusUpper * finalScale)
   rawElementUpper:SetLength(lengthUpper * finalScale)
   rawElementLight:SetOffset(scale)

   finalScale = (minScale) + (-scale * .2)
   rawElementLower:SetRadius(radiusLower * finalScale)
   rawElementLower:SetLength(lengthLower * finalScale)
   rawElementLight:SetRadius(radiusUpper * (1 + (math.abs(scale))))
   rawElementLight:SetLength(radiusUpper * (4.5 - (0.5 * math.abs(scale))))

   -- STEP 4
   --
   -- If the size expands to larger than the original sprite, call:
   --
   --   entity:RecalculateExtents()
   --
end
« Last Edit: September 29, 2015, 06:42:30 PM by sillytuna »

sillytuna

  • Eufloria lacky
  • Administrator
  • Arboreal Being
  • *****
  • Thank You
  • -Given: 58
  • -Receive: 71
  • Posts: 441
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #90 on: September 29, 2015, 12:26:09 AM »
The ParameciumMine sprite is defined as:

AddSprite Type:ParameciumMine
   AddLayer Body
      Set type                        TextureCenter
      Set texture                        SpriteTexture1
      AddElement Body_1
         Set collision                  0.5
         Set baseWidth                   5
         Set baseLength                  4
         Set colour1                     BodyBack, 150
         Set colour2                     BodyFront, 150
         Set hotspotMode                  Relative
         Set hotspot                     0, 0.1
      AddElement Body_2
         Set baseWidth                   5
         Set baseLength                  4
         Set angle                     180
         Set colour1                     BodyBack, 150
         Set colour2                     BodyFront, 150
         Set hotspotMode                  Relative
         Set hotspot                     0, -0.1

   AddLayer Light
      Set type                        TextureCenter
      Set texture                        SpriteGlow
      AddElement Light_1
         Set baseWidth                  7
         Set baseLength                  7
         Set colour1                     163, 249, 2, 150
         Set colour2                     163, 249, 2, 150


AddSprite Type:ActivatedParameciumMine Parent:ParameciumMine
   SelectLayer Light
      SelectElement Light_1
         Set colour1                     White
         Set colour2                     White


sillytuna

  • Eufloria lacky
  • Administrator
  • Arboreal Being
  • *****
  • Thank You
  • -Given: 58
  • -Receive: 71
  • Posts: 441
  • Eufloria: Yes
Re: The "I want to but I can't" modding requests thread
« Reply #91 on: September 29, 2015, 12:27:23 AM »
For completion, the mine object itself is defined as:

AddMob Type:ParameciumMine Parent:Mine
   Set speciesID                     PARAMECIUM_MINE
   Set sprite                          ParameciumMine
   Set onActivateLuaHandler            ParameciumMineActivateHandler
   Set onUpdateLuaHandler               ParameciumMineUpdateHandler
   Set onDeathLuaHandler               ParameciumMineDiedHandler
   Set defaultScale                  1
   Set speedPowerRule                   1, 20, 1.5
   Set explosive.rangePowerRule         15, 15, 1
   Set detonator.triggeredFuseTimerPowerRule   0.15, 0.15, 1
   Set detonator.triggeredSprite         ActivatedParameciumMine