Hello all, I haven't posted in awhile but I still read the forum almost daily during my check on all the sites I visit frequently.
Anyways I thought make a small update for anyone who's interested in my project. Since making a new list of things to do for
a playable version around a month or so ago we've made good progress on a lot of stuff, Unfortunately most of it is code based
so theirs not much to show in a video or anything but there is one new system I wanted to show off and get opinions on.
My new unit and component creation and customization system all done through lua.
(Please keep in mind that this is only the first fully working version, there's still more stuff I plan to add.)
To create a new weapon all you need to do is make a blank .lua file with something like the following in it.
This is an example of a weapon created through the new system:
Code: Select all
local BP = {
WeaponType = "Laser",
Name = "ScatterShot",
Icon = "Art/menu/lasers.png",
Size = "Medium",
Range = 15,
Damage = 1,
ApCost = 2,
Accuracy = 6,
FiringType = "ScatterFireType",
ProjectileAmmount = 5,
BurstAmmount = 3,
ProjectileDelay = 0.5,
Projectile = {
texture = "art/laser.png",
x = 0,
y = 0,
speed = 15,
life = 5,
r = 0,
g = 0.8,
b = 0,
emitter = {
texture = "art/highlight.png",
maxParticles = 20,
dieRandMin = 30,
dieRandMax = 80,
sizeRandMin = 7,
sizeRandMax = 8,
scaleSpeed = 150
}
}
}
The great thing is every value had default parameters so you only have to set the ones
you want to change from default and they don't need to be in any specific order, for instance
you could just make a weapon with the following:
Code: Select all
local BP = {
Name = "ScatterShot",
Damage = "9001",
}
and it would just create the default weapon with that name and damage.
Now all the components are similiar to this but here's an example of a units bp file:
Code: Select all
BP = {
Name = "Hazar",
MaxHp = 40,
MaxAp = 30,
Class = "Destroyer",
UnitImage = "Art/Ships/mediumShip.png",
Width = 2,
Height = 3,
SequenceSpeed = 7,
WeaponSlots = {
{
Weapon = "Pow Pow Cannon",
SlotType = "Top",
SlotPosition = 0,
SlotSize = "Large"
},
{
Weapon = "Empty",
SlotType = "Front",
SlotPosition = 1,
SlotSize = "Large"
},
{
Weapon = "Laser Spewer",
SlotType = "Top",
SlotPosition = 3,
SlotSize = "Medium"
},
},
EngineSlots = {
{
Engine = "small engine",
SlotPosition = 4,
SlotSize = "Small",
EmitterPosX = 16,
EmitterPosY = 16
},
{
Engine = "medium engine",
SlotPosition = 4,
SlotSize = "Medium",
EmitterPosX = 16,
EmitterPosY = 16
}
}
}
Now obviosly theres many parameters not in the examples of both weapon or unit because there
using the defaults but as you can see how easy it is to make new units and components with this new lua system.
Well that's the main thing I wanted to show, so any thoughts? or perhaps ideas of ways to improve it further?