View Full Version : Graphical Shield use in game engine
Baron von Beer
03-17-2003, 23:59
Ok.. I have been working on some units and am nearing completion of my project. I have reached a fork in the road though. I've read in Wellingtons FAQ that a unit can have 2 shields. This jumps half the hurdle for me.... 1 "shield" would be a shield, the other "shield" would be a helmet, in my case. So, how does the game engine determine which is rendered first? I know you can specify if the unit of the shield is animated first, but what of 2 shields? I would need them rendered in order of person,helmet,shield from the front angles. (From rear angles, shield, then person, then helmet, so this would work assuming 2 shields can be assigned.) Since both the helmet and shield would be rendered after the unit, which first? Does it use shield number, a coin flip, or does it somehow read my mind and render them in the opposite order I need? http://www.totalwar.org/forum/non-cgi/emoticons/smile.gif This may seem trivial, as the shield will likely overlap only a tiny portion of the helmet, but It will just look bizzare having a shield "In" the helmet.... kind of like the X files episode with the time ripple...
Thanks for any feedback... I tried typing out an explanation to why I am trying to accomplish this, but the post quickly turned into a novel.... so I just left the question. http://www.totalwar.org/forum/non-cgi/emoticons/wink.gif
Lord Krazy
03-18-2003, 09:52
Quote[/b] (Baron von Beer @ Mar. 17 2003,16:59)]I've read in Wellingtons FAQ that a unit can have 2 shields. This jumps half the hurdle for me.... 1 "shield" would be a shield, the other "shield" would be a helmet, in my case. So, how does the game engine determine which is rendered first? I know you can specify if the unit of the shield is animated first, but what of 2 shields? I would need them rendered in order of person,helmet,shield from the front angles. (From rear angles, shield, then person, then helmet, so this would work assuming 2 shields can be assigned.) Since both the helmet and shield would be rendered after the unit, which first? Does it use shield number, a coin flip, or does it somehow read my mind and render them in the opposite order I need? http://www.totalwar.org/forum/non-cgi/emoticons/smile.gif This may seem trivial, as the shield will likely overlap only a tiny portion of the helmet, but It will just look bizzare having a shield "In" the helmet.... kind of like the X files episode with the time ripple...
Thanks for any feedback... I tried typing out an explanation to why I am trying to accomplish this, but the post quickly turned into a novel.... so I just left the question. http://www.totalwar.org/forum/non-cgi/emoticons/wink.gif
It's the 0 and the 1 at the end of the line
in the items shields docs
-2 -32 1 -42 7 -19 9 -29 1 now you see it
10 -33 7 -42 8 -21 4 -30 0 now you don't
Which get's rendered first?
I think it's the first designated in _S.txt
but I'm not sure.
Let's face it what you are proposing is
not easy and needs ahell of alot of work.
If you want to KNOW which get's redered first
well give a unit 2 shields and see what happens?
When you have done that then you can
get stuck into the hard part http://www.totalwar.org/forum/non-cgi/emoticons/wink.gif
Do you understand what is involved in doing
the coords for the shields http://www.totalwar.org/forum/non-cgi/emoticons/eek.gif
I can think of easier ways of going mad if that's what you desire http://www.totalwar.org/forum/non-cgi/emoticons/biggrin.gif
I'm glad you didn't write a novel
the short story was frightening enough http://www.totalwar.org/forum/non-cgi/emoticons/joker.gif
LK http://www.totalwar.org/forum/non-cgi/emoticons/smokin.gif
Wellington
03-18-2003, 22:32
BvB,
LKs correct. It is the order in the Shields.txt which relates directly to the Shield1/2/3/4/5 folders.
What your attempting is a task indeed - but rather interesting. I have a "ShieldModder.vbs" utility that resizes/reorients/reconfigures shield images for any unit bearing such an image. A couple of guys involved in the Patrician mod have been using it for a while for the new units they are creating.
At present, however, this utility only handles the camera-angle level. In other words it does'nt yet allow individual manipulation of individual frames (only because I never anticipated such a requirement - but it really should'nt be too difficult).
Can I suggest you give me an idea of what your trying and I'll send this utility that you can try out. It will require changes but such changes are minimal.
One thing to note. With a helmet (defined as shield type image) that you wish to use for your unit - it's only feasible if the helmut is symmetrical. It would'nt work for Viking helmuts with horns (just for example).
Welly
Baron von Beer
03-19-2003, 01:02
I know it is gonna make brain surgery seem like a nice weekend hobby.... I am still debating what path to take, as the payoff will probably not be worth the effort...
As it stands, I am nearing completion of 3 sets of units. They are of identical models, but cosmetically different. (So I only need to make 1 set of shield coordinates for a helmet, which will be usable on all 3 sets.) The reason being: I have one helmet made now, that I can just put on each set (though having to reposition the unit frames to allow them to fit, and thus the unit fram size coords... very easy to do, relative to making helmet a shield.) However, I was considering making 3 helmets, to use as a shield, so all 3 could be used with each set. Instead of having 3 choices, there would be 9, as to the unit look. 3 helmets, 3 unit looks.
I am thinking I will put the Helmet/shield on the back burner, and just "attach" the helmet to the units.. as it stands, the 3 sets were made (could be used for others though) unit.. I will have 2 devised from the original. (Since the difference was only in a cosmetic sense, is quite easy) I could have just stuck with the one, but the time to do the other 2 was minimal, and allows a choice for which "look" is preffered.
As it stands, I will have to do a little shield positioning tweaking for the unit, so will get a good taste of what is entailed in it. If after I get the 3 done as oringinally planned, I decide to try the shield/helmet for them, I can't say I was amply warned of the dark, tedious road that I would set out upon. http://www.totalwar.org/forum/non-cgi/emoticons/wink.gif
Either way, I ought to have screens up of the 3 as are, tonight, or tomorrow, in the Patrician thread, and can show more of what I was thinking of doing. (what's the saying, a picture is worth a thousand words?)
BTW Wellington, THANKS for the offer If you could send it, even If I abandon the shelmets (shield helmets.. http://www.totalwar.org/forum/non-cgi/emoticons/smile.gif ) It could prove most useful for the other units I have lined up to make. E-mail is pgrasham@charter.net
Thanks again for responding guys (I know I just started modding, but I've learned more from that FAQ and user feedback in a week than I could have ever hooped to on my own!http://www.totalwar.org/forum/non-cgi/emoticons/wink.gif
Wellington
03-19-2003, 18:21
BvB,
I'll E-mail you something later tonight in respect of this "ShieldModder.vbs"
The latest version (I just checked - it's some time since I used it) is called "SPM.vbs" - Shield Position Modifier.
It's not so big - only a 20K E-mail or so. I just have to collect the various examples I have distributed throughout my PC and package it as a coherent offering http://www.totalwar.org/forum/non-cgi/emoticons/confused.gif
Expect an E-mail later.
Welly
vBulletin® v3.7.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.