Thursday, April 12, 2012

[FA] Blueprints...

[:1]Hi,
Is is possible to make a completely new blueprint in modblueprints using another blueprint as the base for the new blueprint..
like if i wanted to make another commander blueprint.. uel0001
and make a new blueprint from this blueprint uel0002 ...
if this is possible.. how :)|||Domino|||cool beans, :)|||But what about textures, animations and scripts all these will brake.|||Hi,
liveordie|||For one unit it would be faster to just copy it and use notepad++ to replace the id in each file :wink:|||ofcourse, but i dont want to do it for just one unit (whats the point in that lol) ... or a few units, i want to do it for all units.. :) what i want to do might not even work... however if it does it will be awesome!!|||In a nutshell, yes. I'd even call it easy.
What's not so easy is getting the engine to look for your script. I'm not really sure how it does that, as bp.Source is removed for unit blueprints. If you can figure out where the engine looks for object scripts that don't have associated .bp files (start by logging import), the rest is just a matter of adding a unique identifier string to your dynamically-created unit blueprints that an import hook looks for and magically re-directs to the original unit's script file.|||Hi,
Ive discovered something truely amazing!
when defining a new meshblueprint like say for instance.. the cloakmesh...
i can define a new units mesh... to use a new shader for the cloak effect...
well
say my commander cloaks i can switch the mesh to the cloakmesh... this is basic blueprint modding however... when this mesh is switched... it can also be used to turn the commander into any other game unit... BUT also the script that this new mesh uses can also be switched.. so .. i can turn the commander into say "a t1 engi" and have the new mesh use the t1 engies script... THIS IS FOOKIN SUPER DUPER! EPIC INFACT in essense the commander BECOMES a t1 engi...
with my blueprints changes ie replicating all unit blueprints.. i need to make new script classes for each unit faction type.. :/ a little work involved.. should be easy though..
ie uef air, uef walkinglandunit, uef seaunit, so some coding to do there to sort the unit into the correct category and point the script class to the new class i need.. because the new unit bps i create will not have working weapons.. there is an error in the ai when i use the default with weapons removed from the bp... ie the units script still has them so it causes errors in the ai.. so i need a blank script for this unit with no weapons table.. there is also some small problems with unit icons for the replicated.. although i can script a fix for this easy..
there is some work involved in this... its not as easy as first thought... BUT i think what we will get after is worth the scripting time..|||What exactly are you doing to 'switch' the script? There's not really a kosher way to do that for a unit that's already created. How is that relevant to the issue of duplicating units anyway? And why do you need to duplicate units?|||Hi,

Mithy|||Why not just create one hologram unit and call SetMesh on it to customize its hologram appearance? It doesn't have to fully replicate the behavior of the unit it's mimicking - doing that fully would be far, far, far beyond the scope of a procedural blueprint mod anyway. If there are issues with SetMesh changing the unit's script module (I've never heard of this, but you seem to indicate that's what's happening?), then use Blueprints.lua to copy MeshBlueprints instead of copying units, and point the hologram at the copies that have no script module specified.
I'm not really clear on where you're seeing ScriptModule/ScriptClass. They're used in the weapon blueprints of several SC2 units, so I'm aware of how they work there, but I never ran across any references to them in FA, nor any use of them directly in the unit blueprint. Can you actually specify them in the unit's blueprint root, and have the engine use that module and class for that unit blueprint? If so, that radically simplifies unit duplication for e.g. SC2 AI-specific units, although unit duplication is still not a great solution for a hologram unit for a variety of reasons.|||yeah pal you can specify the ScriptModule/ScriptClass in the units blueprint and the engine will use those..
as for duplicating units for holograms...
i would love to duplicate all unit bps and rename them something like uel0001_hologram
however even if i could replicate the bps without my game crashing at ferforming said action.. i think there would be a problem with the bp source param.. as i dont want to only duplicate the bps i need to change entries in the duplicate.. if that hurdle could be crossed... then there is the issue of the script.. id have to make new classes for each faction unit class.. there is alot of work there..
ill stick with my current system...
taking a stock blueprint and script.. renaming it _hologram changing its script class to also reflect unitis_hologram... and running a blueprint.lua function to change all the needed entries... its ok doing it this way... i have refined it alot over the last few days.. its quite painless and takes around 30 seconds to make a new uit hologram.. from an existing unit.|||You just glossed over what I suggested - duplicating meshblueprints and simply switching the mesh of a dedicated hologram unit. What's the possible disadvantage of this? All animations/etc should be contained within the meshblueprint, so the hologram unit would fully appear to be the unit whose mesh it's copying.
You also never mentioned any kind of crash or problem with unit blueprint duplication - what are you trying, and what's in the log when it crashes?

No comments:

Post a Comment