Battlezone Universe

Battlezone Universe => Battlezone 2 => Maps and Modding => Topic started by: ScarleTomato on January 11, 2009, 05:12:37 PM

Title: Any class that can support loop animations and taps?
Post by: ScarleTomato on January 11, 2009, 05:12:37 PM
I have a building right now that i want to have a tap and a looping animation. When it is a powerplant, powerlung, or extractor class it will run the loop animation but not create the tap specified in the poweredbuildingclass section. When it is a powered or recycler class it creates the lung fine but only runs the deploy animation and wont run the second animation, the loop one. If i make the loop animation the only one it looks like the beginning of that xsi but wont move.

Any class that can support both a tap and a loop animation?
Title: Re: Any class that can support loop animations and taps?
Post by: TheJamsh on January 11, 2009, 06:34:25 PM
i was under the impression that powerplant worked with taps... post the ODF here so we can see

if not then i think youre out of luck, unless you want to use .dll power to make it work (and NK1 has made a loopanimator class for .dll help)
Title: Re: Any class that can support loop animations and taps?
Post by: Avatar on January 11, 2009, 07:59:28 PM
I've definitely used taps on Extractor class objects, and posted a picture of it.  The main drawback to using them is the creation of scrap space in the scrap bar.  Seems like it makes a small line even if set to zero.

Depending on the building you can use the loop animation of the lung...

For example, let's say you want a SupplyDepot that has a looping animation.  You make the SupplyDepot a fake or invisible object requiring power iva a lung, and make the lung the part of the building that loops.

-Av-
Title: Re: Any class that can support loop animations and taps?
Post by: Nielk1 on January 11, 2009, 09:06:55 PM
I've never used taps on an extractor, if you get t working let me know how so I can stop using things ike service bays or relay bunks with extractors tapped onto them!

(Note, Powered can have taps but the addLung function is broken and will not show unless something else is missing a lung.)
Title: Re: Any class that can support loop animations and taps?
Post by: ScarleTomato on January 12, 2009, 12:49:06 AM
an extractor with taps should suit me fine for now, since i know for a fact it supports loop animations. Do you remember which section of code you put it in Avatar? Ive tried GameObjectClass, ExtractorClass, PoweredBuildingClass, and BuildingClass.

Here's a mockup odf ive been using to test it. if yall can modify this to work then it should be easy enough to port over.
Code ("ibpgen.odf") Select
[GameObjectClass]
classLabel = "ibscav"
scrapcost = 0
buildTime = 0

[ExtractorClass]
//PoweredByTaps = false
powerTap1 = "HP_COM_1"
powerName = "ivscout"

Title: Re: Any class that can support loop animations and taps?
Post by: ScarleTomato on January 13, 2009, 09:44:09 PM
well ive tried a couple more classes and still cant find any way to support both through one building. Indeed i could create a building with both the lung i want and an animated lung, but i also want the building preview to show the animated part. Which if it is a lung, it wont.

I have another question about the classes though. Are these like C classes? In where you can have certain classes inherit other classes? Like does the PoweredBuilding Class automatically inherit the all the Building Class attributes? Like any PoweredBuilding class object will also use anything the [BuildingClass] section? If so is there any documentation as to what all the classes are children of?

Eh, now that i think about it i suppose if it were that simple, I wouldn't have had to think about it anyways since the powered building class would have then inherited the animation stuff from the gameobjectclass. Ah well, is there anything that could tell me what attributes can be used for the classes?
Title: Re: Any class that can support loop animations and taps?
Post by: Avatar on January 13, 2009, 10:45:25 PM
No inheritance in BZ2, but I think that's how DR2 was set up...  Ken posted about it a bit.

All taps go in PoweredBuildingClass for normal buildings, and don't mention Spires because GT's in BZ are actually vehicles disguised as buildings...   :)

[PoweredBuildingClass]
powerTap1 = "HP_TAP_1"
powerName = "fblung"
detectRange = 600

Some of the tricks to doing this the 'old fashioned way' are that the 'lung' building must not own terrain and must supply power:
ownsTerrain = 0
Powercost = -1

The building that has the tap must own terrain and require power:
ownsTerrain = 1 (or contain a terrain__h object)
Powercost = 1

I say 'old fashioned way' because you can specify non-power taps in 1.3 and I haven't experimented enough with that switch... yet...

-Av-
Title: Re: Any class that can support loop animations and taps?
Post by: TheJamsh on January 13, 2009, 10:51:12 PM
you can use inheritance in pb4/pb4a. you just need the [blahblah] headers and then to enter any differnet lines in under them.

can be useful. for example, i have effects applied to ALL my weapon crates in BZ2. should i want to adjust it slightly, i can use inheritance so they all inherit effects + physics from one file. easy
Title: Re: Any class that can support loop animations and taps?
Post by: Avatar on January 13, 2009, 10:57:31 PM
That's ODF inheritance, where it looks like ST was talking about things like 'poweredbuildingclass' being a subset of 'buildingclass'...  unfortunately in BZ2 each classLabel defines an object that's specified in the game code as a class.   They're all separate chunks of code, and not connected in that way.

-Av-
Title: Re: Any class that can support loop animations and taps?
Post by: Nielk1 on January 13, 2009, 11:03:32 PM
Oh, It is very likely they are connected as super and child classes, but that is programming, not the front end we use.

HOW DO YOU TAP ONTO AN EXTRACTOR?

I've NEVER had it work.
Title: Re: Any class that can support loop animations and taps?
Post by: ScarleTomato on January 13, 2009, 11:51:16 PM
not sure what im doing different but i can't even seem to get a lung on the extractor. Tried it in 1.2 to see if maybe 1.3 just changed it around somehow and it has the same effect. Heres my scav calling for a powerlung. It deploys and I then end up with -1 power, no lung. it seems like im in Nielk1's boat as well. Here's my ibscav.odf. (http://stu.cbu.edu/~myarbrou/ibscav.odf) Care to take a look and see if anything strikes you as odd? The only thing i could think is that for some reason extractors won't let you use HP_COM_1 for taps but that doesn't seem too plausible to me since anything else will.
Title: Re: Any class that can support loop animations and taps?
Post by: Avatar on January 14, 2009, 02:08:59 AM
Hmmm, I wish I still had that picture.  I either had an Extractor with a lung or a building with an Extractor for a lung...  I'm thinking now that it was the second, and that's how I found that lungs can't own terrain.  I'm sorry I falsely got your hopes up...

My own test runs just now show just what you found, that the looping buildings won't spawn a tapped object. 

You need a building with a loop animation that allows a tap to create something else?   Would a chain work?  Say, Powered (deploy) taps off whatever you want (say, a GT) that has a lung (loop) that looks like it's part of the original building?

I'd love it if GSH would add a few of the animation support routines that modders like myself and Nielk1 have added to the DLL's.  It's pretty simple to watch for an animation and then start it afte a certain delay.  (well, simple once GSH gave me the code for it... heh)

-Av-
Title: Re: Any class that can support loop animations and taps?
Post by: ScarleTomato on January 14, 2009, 04:33:24 AM
ah well, i may try using the chain workaround. I see from commandos modlog that theres support now for more than one type of tap on a building. So I may just have a dummy building with the collision and an invisible mesh so the wireframe preview still shows up and create the animated building and the tap both off of that.

I need to get into dlling more myself. School has started back up now though. Dagum life and its priorities!  :-P
Title: Re: Any class that can support loop animations and taps?
Post by: TheJamsh on January 17, 2009, 05:04:31 PM
the best way to do it is to use different tap types on the same powered terrain owning base. only real way.
Title: Re: Any class that can support loop animations and taps?
Post by: ScarleTomato on January 17, 2009, 06:18:53 PM
yeah... my problem is that i get distracted :P

http://www.youtube.com/watch?v=N4fkcLhAgGs
Title: Re: Any class that can support loop animations and taps?
Post by: Avatar on January 17, 2009, 06:32:25 PM
LOL!   Plasma Frogs?  Energy Crickets?  So pretty, all jumping and glowing like that.

:)

-Av-
Title: Re: Any class that can support loop animations and taps?
Post by: TheJamsh on January 17, 2009, 07:29:49 PM
dude thats really good
Title: Re: Any class that can support loop animations and taps?
Post by: hybirdisdf on January 17, 2009, 07:56:20 PM
Was it a 1.2 things?I never see that kind of strange pattern of plasma balls.Thunderbolt ship comes with plasma?
Title: Re: Any class that can support loop animations and taps?
Post by: TheJamsh on January 17, 2009, 10:04:31 PM
he moded it dude...
Title: Re: Any class that can support loop animations and taps?
Post by: ScarleTomato on January 19, 2009, 05:23:37 AM
yeah i keep trying to create one thing and keep going off on wild tangents (http://www.youtube.com/watch?v=1QsoJGCFCx4)

one question though, it appears that silos cant be upgraded. is this something that might change in the future? Im using upgradable buildings with silo taps as a workaround but still seems kind of messy.

another thing, If i upgrade a tap then the parent building thinks the original tap is gone and the player can re add the lung, not sure yet how to get around this. Have any of yall run into this problem or a workaround? I tried using a dummy tap as powerName1 but contrary to the changelog the cons does seem to use powername2 and 3 for adding back the second and third taps
Title: Re: Any class that can support loop animations and taps?
Post by: TheJamsh on January 19, 2009, 01:47:24 PM
silos are upgradeable, i had one that you could upgrade three times... im pretty sure of it...

as for the third paragraph, just add a provideName in the ODF, so that the second tap 'provides' the first tap.

e.g.

ProvideCount = 2
ProvideName1 = "tapone"
ProvideName2 = "taptwo"
Title: Re: Any class that can support loop animations and taps?
Post by: ScarleTomato on January 19, 2009, 03:37:44 PM
oh! Ok, didn't even think about the tap providing. thats cool

i cant for the life of me get a silo to upgrade, heres a test odf ive been trying to use, does this work for you?
Code (ibs.odf) Select
[GameObjectClass]
classLabel = "ibssilo"
upgradeName = "ibsilo"
when i try to upgrade it it just shows the little purple box as if it requires something but there's no requireName field.
Title: Re: Any class that can support loop animations and taps?
Post by: Avatar on January 19, 2009, 05:34:48 PM
Doh...  never mind my first post if you read it... 

I also have upgradable silos, and have found that not being able to upgrade usually means the requirements for the upgrade haven't been met.  Can you post the ODF for the upgrade?

-Av-
Title: Re: Any class that can support loop animations and taps?
Post by: ScarleTomato on January 19, 2009, 08:36:59 PM
its just the regular ibsilo in patch13.pak
Code (ibsilo.odf) Select
[GameObjectClass]
baseName = "ibsilo"
mrmFactor = 0
geometryName = "ibsilo00.xsi"
classLabel = "silo"
scrapCost = 40
scrapValue = 0
maxHealth = 5000
maxAmmo = 0
unitName = "Silo"
heatSignature = 2.0
imageSignature = 1.0
radarSignature = 1.0
collisionRadius = 1.0
isAssault = 1
canInteract=1 // for missile lock

buildSupport = "N"
buildRequire = "N"

armorClass = H

isSingle = 1 //Determines whether only one of a certain unit or building can be built per team.

requireCount = 0

[BuildingClass]
soundAmbient = "iext01.wav"

[SiloClass]
initDelay = 1e6 // 10.0 // How long before produces first scrap.
scrapDelay = 1e6 // 10.0 // How long between scrap after first is created.
scrapHold = 20 // Scrap capacity.
detectRange = 100
i tried changing isSingle to 0 to no avail.
I also tried just changing the classLabel in ibscav to "silo" and it had the same effect
Title: Re: Any class that can support loop animations and taps?
Post by: Avatar on January 19, 2009, 09:58:37 PM
Great...  I just tried my upgradeable Silos and they don't upgrade either.  You DO get the blank message box, as if there's something that's required but not present, but no message.  Grrrrrr....

-Av-
Title: Re: Any class that can support loop animations and taps?
Post by: ScarleTomato on January 20, 2009, 01:36:39 AM
whew! so i haven't lost all my sanity yet (at least, i have the illusion of such) :P
Title: Re: Any class that can support loop animations and taps?
Post by: hybirdisdf on January 20, 2009, 02:28:42 AM
Hmm,Is that a called hyperspace turbo portal? :lol:
Title: Re: Any class that can support loop animations and taps?
Post by: TheJamsh on January 20, 2009, 05:42:29 PM
ah i remember how i solved it now!

instead of silo class, i made it an extractor class i think, and just set its scrap settings to the same as the silo class. jobs a good un! still works pretty much the same.

a lot of the time, the annoying purple box of nothingness can be caused by the isSingle command. its FAR better to use Limitclass or TeamLimitClass, my comm towers wouldnt upgrade when the original had 'isSingle' and the upgrades ODF provided the original. nightmare!
Title: Re: Any class that can support loop animations and taps?
Post by: Nielk1 on January 20, 2009, 06:01:07 PM
The new limiting lines are wonderful.

In MRVP 2.0 I currently have the Self Defending Extractors and the Separate Silo Extractors un-animated. I will likely throw in the lines for my DLL to use to animate them, but it is only useful if in a special map that HAPPENS to have my code. In stock, they are still inanimate.

OK, issues we have found thus far with pb4a in relation to modding in this respect:

Powered class structures do not cause the addLung menu to appear although they do populate it. [Currently Reported, Still needs good repo]
Silos are incapable of upgrading. [Will report after I check for myslef]

EDIT: ST, your videos are now listed in my BZComplex gallery. I hope to see some more videos of unique modding creations. I will keep listing them in my gallery (unless told to stop) unless you start putting them in yourself. If you want any particular description on them, just comment that on them.
Title: Re: Any class that can support loop animations and taps?
Post by: TheJamsh on January 20, 2009, 06:07:08 PM
would it be difficult to allow buildings to support more animation types? i dont mean to write blank cheques, but this does seem to crop up a lot...

hell! seeing as im on a little request rampage, PLEASE RESTORE UN-TEAMFILTERED DAMAGE! or at best add an option for it to be on or off in explosion classes? seems to have hindered a lot of things.
Title: Re: Any class that can support loop animations and taps?
Post by: ScarleTomato on January 20, 2009, 08:06:01 PM
thats cool nielk, i don't mind at all. I used to have a couple of toys up on timedisruptors ftp to actually play around with or add into mods and things. It wasn't until they started claiming originality that i decided to be a little more cautious with the stuff I actually spend time on. :P

jamsh, those upgradable silos that were extractors, could you make them green on the scrap bar? I like that way better but its to replace the recycler capacity, so i want it at the top of the bar.
Title: Re: Any class that can support loop animations and taps?
Post by: TheJamsh on January 21, 2009, 01:18:58 PM
yeh easy, just set its fill rate to 0, anything below 0.3 of a second makes it green i think