Eufloria > Eufloria Classic Mods

The "I want to but I can't" modding requests thread

<< < (18/19) > >>

DIV:
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:

--- Quote from: DIV 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.

--- End quote ---

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:
Thank you very much  :)

Lost Seedling:
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.
--- End quote ---

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:
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

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version