Page 10 of 37
Re: smoth's junk.
Posted: 27 Nov 2012, 15:18
by smoth
gajop wrote:so still not sure; are these team colors or team + tank colors?
if those are just team colors, it seems kinda hard to distinguish between 2nd and 3rd tank type
I have(since I think grts 1.0) and always will use health bars and teamplatters for team color. I only ever used it on 3dos(which were years old) and buildings.
jK wrote:imo make another more hi-poly (5k-10k) model of it to generate a normalmap with nvidia's `melody` tool.
I don't know how. But so far I am happy with these results.
jK wrote:Also the texture seems to have mipmap overlapping
do tell? can you mark the image where you are seeing this?
Re: smoth's junk.
Posted: 27 Nov 2012, 20:33
by rattle
I prefer my tanks in shades of grey.. or throbbing meat
Re: smoth's junk.
Posted: 27 Nov 2012, 23:13
by PicassoCT
The meat part i can understand.. but grey..oh right, germany.. we aint allowed colour yet, besides brown or olive. If we get red flags again...
Re: smoth's junk.
Posted: 27 Nov 2012, 23:36
by smoth
grey blends in too well with the surroundings. I will have grey units but these units in particular are meant to be these colors.
the black one is used for riot suppression
the tan one is fire support and tan and blue because it is more interesting looking
the green is a MBT
Anyway there will be grey-ish mechs but I'll probably stay away from battleship grey.
Re: smoth's junk.
Posted: 27 Nov 2012, 23:50
by PicassoCT
big apology to the ghrey-comunity. This is not a discrimination, rather a unfortunate expression of personal taste. Rest assured that in any other spring game, ghrey-units, if expertise is equal are choosen more often. If possible in combination with greyish-brown underground. And grey-brownish sky.
Tank you.

Re: smoth's junk.
Posted: 28 Nov 2012, 02:25
by smoth
this is what a unit looks like without the colors applied.
Re: smoth's junk.
Posted: 28 Nov 2012, 06:46
by smoth
From left to right.

wolf spider: single vulcan
huntsman: Energy cannon

Bola: kinetic munitions, smoke grenades
tarantula: twin linked energy cannon(fires 2 energy shots at 1 time)
birdkiller: slaved twin vulcans with independent vulcan mounted on top.
all 5 tanks, and their variant weapons systems are supported by 1 script
Code: Select all
-------------------------------------------------------
-- License: Public Domain
-- Author: Steve (Smoth) Smith
-- Date: 11/27/2012
-------------------------------------------------------
-- Piece names
base = piece 'base'
local treadCount = 4
weaponBarrel = {}
weaponSleeve = {}
weaponPiece = {}
twinLinkedPiece = {}
weaponTurret = {}
tankTreads = {}
-- State variables
isMoving, isAiming = false, false
local spGetUnitDefID = Spring.GetUnitDefID
local unitWeapons = {}
-- Signal definitions
local SIG_AIM = {2,4,8,16}
-- effects for emitters
local effectA = 1024
local function TreadAnimations()
local treadnum = 1
local lastTread = treadCount
-- get all my treads.
local counter = 1
while ( counter-1 < treadCount ) do
--Spring.Echo("treads"..counter)
tankTreads[counter] = piece ("treads"..counter)
counter = counter +1
end
-- Spring.Echo("tread count: " .. counter)
-- hide all tank treads
for treadNumber,_ in pairs(tankTreads) do
if treadNumber ~= lastTread then
Hide (tankTreads[treadNumber])
end
end
while( 1 ) do
-- moving animation
if(isMoving == true) then
--Spring.Echo(treadnum, lastTread)
Hide (tankTreads[lastTread])
Show (tankTreads[treadnum])
lastTread = treadnum
treadnum = treadnum + 1
if( treadnum == treadCount+1) then
treadnum = 1
end
end
Sleep (50)
end
end
function script.StartMoving()
isMoving = true
end
function script.StopMoving()
isMoving = false
end
local function getWeaponData()
weapons = UnitDefs[spGetUnitDefID(unitID)].weapons
local counter = 1
for k,v in pairs(weapons) do
Spring.Echo(" --= weapon number: " .. counter .. " =-- ")
unitWeapons[counter] = {}
if WeaponDefs[v.weaponDef].customParams.abilityweapon then
unitWeapons[counter].abilityWeapon = WeaponDefs[v.weaponDef].customParams.abilityweapon
weaponPiece[counter] = base
weaponBarrel[counter] = base
else
-- twinlinked covers when we have two barrels firing at 1 time
-- (such as a double barrel shotgun)
if WeaponDefs[v.weaponDef].customParams.twinlinked then
twinLinkedPiece[counter] = piece ("weapon".. counter .. "_a_2")
Spring.Echo(" weapon".. counter .. "_a_2")
end
weaponPiece[counter] = piece ("weapon".. counter .. "_a_1")
Spring.Echo(" weapon".. counter .. "_a_1")
weaponBarrel[counter] = piece ("weapon".. counter .. "_a_barrel")
--Spring.Echo(" weaponBarrel: weapon".. counter .. "_a_barrel")
weaponSleeve[counter] = piece ("weapon".. counter .. "_a_sleeve")
--Spring.Echo(" weaponSleeve: weapon".. counter .. "_a_sleeve")
if v.slavedTo ~= 0 then
unitWeapons[counter].slave = v.slavedTo
--Spring.Echo("slaveto", unitWeapons[counter].slave)
else
weaponTurret[counter] = piece ("weapon".. counter .. "_turret")
--Spring.Echo(" weapon".. counter .. "_turret")
end
end
if WeaponDefs[v.weaponDef].customParams.animation then
unitWeapons[counter].animation = WeaponDefs[v.weaponDef].customParams.animation
end
counter = counter +1
end
end
--------------------------------------------------------
--start ups :)
--------------------------------------------------------
function script.Create()
-- Initial State
StartThread(TreadAnimations)
getWeaponData()
end
function script.AimFromWeapon(weaponID)
return weaponBarrel[weaponID]
end
function script.QueryWeapon(weaponID)
return weaponPiece[weaponID]
end
-----------------------------------------------------------------------
--gun functions;
-----------------------------------------------------------------------
-----------------------------------------------------------------------
-- This coroutine is restarted with each time a unit reaims,
-- not the most efficient and should be optimized. Possible
-- augmentation needed to lus.
-----------------------------------------------------------------------
local function RestoreAfterDelay(weaponID)
Sleep(1000)
if (unitWeapons[weaponID].animation == "spinup")then
StopSpin (weaponBarrel[weaponID], z_axis, math.rad(50))
end
if(unitWeapons[weaponID].slave == nil) then
Turn(weaponTurret[weaponID], y_axis, 0, math.rad(90))
WaitForTurn(weaponTurret[weaponID], y_axis)
end
Turn(weaponSleeve[weaponID], x_axis, 0, math.rad(100))
WaitForTurn(weaponSleeve[weaponID], x_axis)
end
function script.AimWeapon(weaponID, heading, pitch)
if(unitWeapons[weaponID].abilityWeapon) then
return false
end
Signal(SIG_AIM[weaponID])
SetSignalMask(SIG_AIM[weaponID])
if (unitWeapons[weaponID].animation == "spinup")then
Spin(weaponBarrel[weaponID], z_axis, 20)
end
if(unitWeapons[weaponID].slave == nil) then
--Spring.Echo(weaponID, unitWeapons[weaponID].slave)
Turn(weaponTurret[weaponID], y_axis, heading, math.rad(20))
WaitForTurn(weaponTurret[weaponID], y_axis)
end
Turn(weaponSleeve[weaponID], x_axis, 0 - pitch, math.rad(100))
WaitForTurn(weaponSleeve[weaponID], x_axis)
StartThread(RestoreAfterDelay, weaponID)
return true
end
function LaunchSmoke()
EmitSfx(piece 'smoke', 2049)
end
function script.Shot(weaponID)
if (unitWeapons[weaponID].animation == "recoil")then
Move(weaponBarrel[weaponID], z_axis, -1)
EmitSfx(weaponPiece[weaponID], 1025)
Move(weaponBarrel[weaponID], z_axis, 0, 1)
else
EmitSfx(weaponPiece[weaponID], 1025)
end
-- if we have a twin linked barrel to fire
if twinLinkedPiece[weaponID] then
EmitSfx(twinLinkedPiece[weaponID], 2048)
EmitSfx(twinLinkedPiece[weaponID], 1025)
end
end
function script.Killed(recentDamage, maxHealth)
local severity = recentDamage/maxHealth
if (severity <= 99) then
return 3
else
return 0
end
end
(the above code is work in progress but I wanted to show it off, get over it) 
also, in before store in gg. table.. I will, when I am done. Right now, this is the easier way.
Re: smoth's junk.
Posted: 28 Nov 2012, 12:15
by Funkencool
Neat stuff
Will the smoke grenades effect LOS or accuracy? That would be pretty handy, maybe they could be tied to a retreat command? It would be cool see something similar in air, like flairs perhaps.
Re: smoth's junk.
Posted: 28 Nov 2012, 15:02
by smoth
Smoke grenades hide units by turning them stealth, any unit in them is at best a radar blip to it's enemy. The units in the smoke take an accuracy penalty.
Sight flairs are not really something I am doing until I toy with nighttime options.
Re: smoth's junk.
Posted: 28 Nov 2012, 19:05
by PicassoCT
smoth wrote:
this is what a unit looks like without the colors applied.
ripped from halo?
I have nothing negative to say about the tanks, so i make something up.
People can oversee around twelfe diffrent units (and there purposes -> sc, etcc ), you put 5 into the tank. (No, even in BA, most units only appear rarely)
Re: smoth's junk.
Posted: 28 Nov 2012, 23:42
by smoth
so my script supports this now to >:)
Re: smoth's junk.
Posted: 29 Nov 2012, 08:58
by LordMuffe
don“t know why, but I somehow get reminded of EE when i look at those tanks... not a bad thing, mind you... :)
the independent vulcan on the birdkiller: is its rotation-center on the same axis as the main turret?
Re: smoth's junk.
Posted: 29 Nov 2012, 09:06
by smoth

FINALLY created something crazy enough to break my script >:D I present to you "the Alot"
Re: smoth's junk.
Posted: 29 Nov 2012, 11:13
by Erik
Almost enough dakka.
Re: smoth's junk.
Posted: 29 Nov 2012, 17:50
by FLOZi
I take it I have converted you to my way of thinking wrt scripts then, Smoth?

Re: smoth's junk.
Posted: 29 Nov 2012, 18:14
by smoth
yeah
Re: smoth's junk.
Posted: 30 Nov 2012, 07:51
by Das Bruce
Can you outline what's different for your script? I'd read it but I'm pressed for time and lazy.
Re: smoth's junk.
Posted: 30 Nov 2012, 15:49
by smoth
essentially I am using piecenames and table generation to automagically cover different types of tanks. I use custom parameters to add extra stuff like animations or behaviors. The script reads all this and assembles tables at the unit creation call to get weapon data and bam instead of 100+ lines to cover 14 weapon you have a single block. the idea is to get it where I can just make model and def, then the script handles everything else.
Re: smoth's junk.
Posted: 01 Dec 2012, 01:04
by smoth
(click for larger)
so now even this works with my scripts. yes most of those are vlaunch missiles. God that weapon type is ugly and cannot be customized to look different fuck vlaunch missiles!
Re: smoth's junk.
Posted: 01 Dec 2012, 02:11
by knorke
do you want comments on the script or is not done yet?