the wiki wrote:Rendertype depreciated
Used for auto detection of ota weapontypes.
renderType | weapontype lookups?
Moderator: Moderators
renderType | weapontype lookups?
I have a bunch of old defs that I need to update. Odds are it is a quick find and replace but I cannot find a reference to what is what.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: renderType | weapontype lookups?
Throw this in weapondefs_post
Code: Select all
local function BackwardCompability(wdName,wd)
-- auto detect ota weapontypes
if (wd.weapontype==nil) then
local rendertype = tonumber(wd.rendertype) or 0
if (tobool(wd.dropped)) then
wd.weapontype = "AircraftBomb";
elseif (tobool(wd.vlaunch)) then
wd.weapontype = "StarburstLauncher";
elseif (tobool(wd.beamlaser)) then
wd.weapontype = "BeamLaser";
elseif (tobool(wd.isshield)) then
wd.weapontype = "Shield";
elseif (tobool(wd.waterweapon)) then
wd.weapontype = "TorpedoLauncher";
elseif (wdName:lower():find("disintegrator",1,true)) then
wd.weaponType = "DGun"
elseif (tobool(wd.lineofsight)) then
if (rendertype==7) then
wd.weapontype = "LightningCannon";
elseif (wd.model and wd.model:lower():find("laser",1,true)) then
wd.weapontype = "LaserCannon";
elseif (tobool(wd.beamweapon)) then
wd.weapontype = "LaserCannon";
elseif (tobool(wd.smoketrail)) then
wd.weapontype = "MissileLauncher";
elseif (rendertype==4 and tonumber(wd.color)==2) then
wd.weapontype = "EmgCannon";
elseif (rendertype==5) then
wd.weapontype = "Flame";
--elseif(rendertype==1) then
-- wd.weapontype = "MissileLauncher";
else
wd.weapontype = "Cannon";
end
else
wd.weapontype = "Cannon";
end
end
end
local function ProcessWeaponDef(wdName, wd)
-- backward compability
BackwardCompability(wdName,wd)
end
for wdName, wd in pairs(WeaponDefs) do
if (isstring(wdName) and istable(wd)) then
ProcessWeaponDef(wdName, wd)
end
end
Re: renderType | weapontype lookups?
well, I kinda want to get this corrected. I can try and use the code to update my files though! So thanks!
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: renderType | weapontype lookups?
You can use something like dngrep (https://github.com/dnGrep/dnGrep/releases) to grep for the rendertypes and replace them with weaponType = blah. Probably the least painful way to go about it.
Re: renderType | weapontype lookups?
a few others are coming up:
"search the wiki," funny, the wiki search is not pulling results for all of these. IMO this thread has a reason to live so that OTHERS who run into this can get answers. Inbefore a certain troll posts in this thread.
Guidance depreciated
(does nothing)
Should this be "use tracks tag instead? or something similar?
*edits*
hmm, seems like we had guidance and tracks? dunno.
Why is it:
"shakeduration"
"shakemagnitude"
// lol taisms in my old defs
"smokedelay"
"startsmoke"
// these were useful, why are they gone now?
- lineofsight
- selfprop
- shakeduration
- shakemagnitude
- color
- dropped
- beamweapon
- beamlaser
- ballistic
- guidance???
- smokedelay
"search the wiki," funny, the wiki search is not pulling results for all of these. IMO this thread has a reason to live so that OTHERS who run into this can get answers. Inbefore a certain troll posts in this thread.
Guidance depreciated
(does nothing)
Should this be "use tracks tag instead? or something similar?
*edits*
hmm, seems like we had guidance and tracks? dunno.
Why is it:
Why not "true" or "false" like the rest of the tags?the wiki wrote:Tracks If the missile tracks a moving target. Can be set to 1 or 0. tracks=1;
"shakeduration"
"shakemagnitude"
// lol taisms in my old defs
"smokedelay"
"startsmoke"
// these were useful, why are they gone now?
Re: renderType | weapontype lookups?
Which wiki page are you referring to?
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: renderType | weapontype lookups?
Make sure you're looking at the gamedev:weapondefs page on the wiki.
Re: renderType | weapontype lookups?
https://springrts.com/wiki/Weapon_VariablesFLOZi wrote:Which wiki page are you referring to?
I would make the changes myself but I am not sure if they are a good idea, so I want to ask before I go and edit stuff.
Re: renderType | weapontype lookups?
I ought to delete that pile of old shit.
Re: renderType | weapontype lookups?
it is the only place I could find old tags to nuke
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: renderType | weapontype lookups?
Yes, you should. As in, asap.FLOZi wrote:I ought to delete that pile of old shit.
Re: renderType | weapontype lookups?
spring should no longer say it runs ota content. This puts many of the *A projects further into "derivative content" based on items take from the Ta .hpi.
Re: renderType | weapontype lookups?
Sorry, smoth, but unlike anime or movie franchises and active game franchises. Game IP can die and be burried. Not even archology can undig TA by now.
Re: renderType | weapontype lookups?
doesn't mean we should NOT try and do better
Re: renderType | weapontype lookups?
But we dont want to do better.
The suggested per Piece auto-Texturing, a newb tool nobody was interested in.
We supply good enough tools to those who where lucky enough to get into spring, when it was still amateurish and easy to get into.
A newb joining today is shit out of look.
And you and me we are part of the problem, walling them with endless tutorials, where all they want is instant success noodles.
Back before ssmf, the mapconverter, with bitmaps.. that was easy access.
And nobody lifts a finger for the allmende. Because, thats not directly measurable a benefit for my game.
Wanting something is worthless, if no effort goes towards it.
The suggested per Piece auto-Texturing, a newb tool nobody was interested in.
We supply good enough tools to those who where lucky enough to get into spring, when it was still amateurish and easy to get into.
A newb joining today is shit out of look.
And you and me we are part of the problem, walling them with endless tutorials, where all they want is instant success noodles.
Back before ssmf, the mapconverter, with bitmaps.. that was easy access.
And nobody lifts a finger for the allmende. Because, thats not directly measurable a benefit for my game.
Wanting something is worthless, if no effort goes towards it.