Using Existing Unit Effects to Create Custom Units

I'm gonna go ahead and release my unit, but if you figure out how to get the scaling to work, let me know.

Thus far I haven't been able to get it to work, either; it was one of the caveats I had at the beginning of the tutorial regarding custom units. I would really love to solve the issue once and for all as it severely limits how effects can be used.
 
Yeah, I mean, I'm sure I've done the XML right, tried checking the different reload boxes in different combinations (Skajaquada had the reload landmarks and reload units checked) made sure I had the OnModActivated action, but nothing seems to work. Skajaquada's mod evidently replaces the base effects XML file, so that may be some kind of hard coded requirement. SQL is probably the way to go, but I haven't gotten that to work either.
 
If you're replacing a base file, it's VFS=true, not UpdateDatabase. SQL won't help, because XML and SQL accomplish the same thing, i.e., updating the SQLite database (XML has to be parsed and converted into SQL by the game).

Depending on when the file is loaded, it may not be possible without a Reload Effects checkbox that Firaxis didn't provide. (And before you ask, the one DLL we have access to isn't the right one to fix this.)

If that's the case, overwriting an existing file or making a fake DLC is necessary, both requiring the user to copy files by hand (or at least to run a batch file or something).
 
If you're replacing a base file, it's VFS=true, not UpdateDatabase. SQL won't help, because XML and SQL accomplish the same thing, i.e., updating the SQLite database (XML has to be parsed and converted into SQL by the game).

Well the way I named the effects XML file wouldn't have replaced the effects base files, although I tried the VFS=true anyway, and it's still not working. I mainly brought up SQL because if we can get it to work, SQL would most likely be a more elegant solution, especially if all you want to do is copy an existing effect and change the scale.

Depending on when the file is loaded, it may not be possible without a Reload Effects checkbox that Firaxis didn't provide. (And before you ask, the one DLL we have access to isn't the right one to fix this.)

If that's the case, overwriting an existing file or making a fake DLC is necessary, both requiring the user to copy files by hand (or at least to run a batch file or something).

Right, I was starting to suspect that we would need a 'Reload Effects' checkbox or a fake DLC as well...
 
Right, I was starting to suspect that we would need a 'Reload Effects' checkbox or a fake DLC as well...

Yikes, now y'all are gettin' way out of my league - at least for the sake of this tutorial, anyway :crazyeye:. If this can ever be figured out, we might need a separate tutorial to cover hard-coding custom effect transforms and such. I am still very interested in the development of this, though, so if any progress is made feel free to post it on this thread as it is still very relevant information.
 
I'm gonna go ahead and release my unit, but if you figure out how to get the scaling to work, let me know.

One possible solution but it involves a bit of re-exporting is to change the scale of your unit so it fits the effect. I have done this for a unit I was working on and when I scaled it to the same size as the civ 5 units it was normal size.

Another option is the cannon crew qtip has a good fire effect as well.
 
I tried scaling my unit up in blender also, but it looked kind of squatty in-game. I'll check out the other fire effects and see what I get.

EDIT: Okay, I've got something a bit less... face melting:

chimu_general4_76D.png
chimu_general3_965.png


I'm using 'ART_DEF_VEFFECT_CAESAR_BRAZIER_01' here. 'ART_DEF_VEFFECT_ASKIA_CITYFIRE_LOW_02' also looked decent, but it's a real pain to get the effect bone in the right position.
 
I'm using 'ART_DEF_VEFFECT_CAESAR_BRAZIER_01' here. 'ART_DEF_VEFFECT_ASKIA_CITYFIRE_LOW_02' also looked decent, but it's a real pain to get the effect bone in the right position.

Very nice! Much more realistic.

One question: since this effect persists through all animations I am assuming you had to apply this effect to every event code? Just trying to verify this is the case.

I am very impressed with the versatility of using not only existing unit effects but also effects from "static" items as well (buildings/wonders and leaderscenes). I am still looking for a good application for Nebuchadnezzar's braziers.... :mischief:
 
Very nice! Much more realistic.

One question: since this effect persists through all animations I am assuming you had to apply this effect to every event code? Just trying to verify this is the case.

Yep.

I am very impressed with the versatility of using not only existing unit effects but also effects from "static" items as well (buildings/wonders and leaderscenes). I am still looking for a good application for Nebuchadnezzar's braziers.... :mischief:

Yeah, I might rig my general to cause a nuclear explosion when activated just for fun :lol:

EDIT: KABOOM! hehe
Spoiler :
attachment.php
 

Attachments

  • Civ5Screen0000.jpeg
    Civ5Screen0000.jpeg
    296.7 KB · Views: 613
Yeah, I might rig my general to cause a nuclear explosion when activated just for fun :lol:

EDIT: KABOOM! hehe
Spoiler :
attachment.php

You weren't a Marine Combat Engineer at some point in your life, were you?!? :bump: :lol:
 
I don't know if you guys already knew this, but to add an effect to every animation (to have it be there ALL the time), you can put an empty event code, i.e. ec="".
Tip of the day:).
Oh, and Nomad? The green fire from Nebby's torches will look great on Skaven Screaming Bells or Plagueclaw Catapults, which have foul braziers filled with burning warpstone at the top... so really I can only think of it as a decoration. Maybe you could do some kind of evil spirit with his head on fire.:lol:
 
I don't know if you guys already knew this, but to add an effect to every animation (to have it be there ALL the time), you can put an empty event code, i.e. ec="".
Tip of the day:).

That's good to know and makes perfect sense. Programmers hate redundancy so it figures that there would be an easier way to do it :).
 
So I finally figured out how to add sound effects, and it's actually very straightforward. You add/delete sound effects in the .ftsxml the same way as for other effects. The sound should be imported the same way as for other sounds, i.e., with VFS = True and Reload Audio System checked. The only tricky part might be the SQL, which should use the 3D system and look something like this:

Code:
INSERT INTO  Audio_Sounds (SoundID,	Filename)
SELECT 'SND_MISSIONARY_BUDDHIST',		'Missionary_Buddhist';

INSERT INTO  Audio_3DSounds (ScriptID,	SoundID,					SoundType,			MaxVolume,	MinVolume,	IsMusic)
SELECT 'AS3D_MISSIONARY_BUDDHIST',		'SND_MISSIONARY_BUDDHIST',	'GAME_SFX',			70,			70,			0;
 
So I finally figured out how to add sound effects, and it's actually very straightforward. You add/delete sound effects in the .ftsxml the same way as for other effects. The sound should be imported the same way as for other sounds, i.e., with VFS = True and Reload Audio System checked. The only tricky part might be the SQL, which should use the 3D system and look something like this:

Code:
INSERT INTO  Audio_Sounds (SoundID,	Filename)
SELECT 'SND_MISSIONARY_BUDDHIST',		'Missionary_Buddhist';

INSERT INTO  Audio_3DSounds (ScriptID,	SoundID,					SoundType,			MaxVolume,	MinVolume,	IsMusic)
SELECT 'AS3D_MISSIONARY_BUDDHIST',		'SND_MISSIONARY_BUDDHIST',	'GAME_SFX',			70,			70,			0;

AWESOME - this changes everything and raises the bar to a whole new level! Keep us informed with your progress... :bowdown:
 
It's been quite a while since you originally posted this tutorial, but I finally got a chance to give it a try!

2015-04-06_00006_zpswgpslenn.jpg


Paratroopers with Plasma Rifles! :D Take that you stinky barbarians...
 
It's been quite a while since you originally posted this tutorial, but I finally got a chance to give it a try!

Spoiler :
2015-04-06_00006_zpswgpslenn.jpg


Paratroopers with Plasma Rifles! :D Take that you stinky barbarians...

:goodjob: Sweet!!!
 
Continuing discussion on this page regarding a comment from this thread:

Nomad, would it be possible to get some instructions on how to add a new bone to a model like you describe? My Robot Infantry model has two gun-arms, but since I don't know how to modify the bones on the tank armature yet its firing the laser from the torso (I.e. the current tank gun bone). It's workable for the time being, but would be nicer if I knew how to make bones for the arms to use...

I can give you an example of how they work (and don't); open the .blend file of the Cobra that I just completed and compare it with the original Helicopter Gunship in CiV (I will attach the files here for your use). You will notice that I duplicated the existing bones that the helicopter gunship uses for its rocket projectile points and minigun and moved them to where they should be located for the Cobra, leaving their parent/child association intact. I could have just moved the original bones in this case instead of duplicating but I am always cautious with modifying original bones as there may be unexpected results (because more than likely they would just return to their original locations in the animations). In the .fxsxml file I changed the names of the bones defined there with the new bones I created (in this case I simply added "C" to the end; by default it will assign ".001"). Ditto for the .ftsxml file; anywhere the original bone name appeared in the file I changed it to the name of the new bones I created. That's it, nothing more to it than that.

This will never work when you are deforming mesh as part of your effect because the animations have no vertex group assignments for the new bones. For example: if you were building a unit with rotating turrets that are in a different location from the existing unit's turrets (like a destroyer, for example) then you may get the effect you desire but the turrets won't move, will deform differently, or will float in space; the animations will deform the turrets relative to the location where they were originally defined.

In the case of the Dalek the limitations would be with the articulation of the arms. You could probably get the bottom Dalek mesh to mimic the tank base and the top mesh to mimic the tank turret; you could not, however, articulate the arms in any way since they are not defined in the tank animation. The plasma rays would simply emit from fixed projectile points on the hands of the Dalek which would rotate with the upper body without otherwise moving.

Below are the basics of how this can be done; see the attached files for reference (in the second image it should read .fxsxml, not .fsxsml...doh!):

Spoiler :

attachment.php


attachment.php


attachment.php

 

Attachments

  • bone copy.jpg
    bone copy.jpg
    218.3 KB · Views: 519
  • cobra_fxsxml.jpg
    cobra_fxsxml.jpg
    243.9 KB · Views: 485
  • cobra_ftsxml.jpg
    cobra_ftsxml.jpg
    204.1 KB · Views: 468
  • Addingbones.zip
    Addingbones.zip
    1.1 MB · Views: 147
Back
Top Bottom