Jump to content

Weapon Editor - The Quartermaster's Armory


Quartermaster

Recommended Posts

So.. when can I download it? :D I just had a peek at the weapon sheet and it seems odd at first glance that lasers have a tenth of the range, but 100x the accuracy of ballistic equalents. I assume this has something to do with how the engine works or some other coding wizardry. That, or the result is largely the same, the very short range doesn't affect it because of the incredible accuracy.

Take a look at weapons_gc.xml when you get a chance. The ranges in the weapons.xml are used for display purposes only and don't really serve any function beyond that as far as I am aware. The values in the two files are definitely pretty incongruent with one another however, which is why it will be nice once I get this program finished.

Unfortunately with graduate school I don't know how much time it will take me to finish this program, especially once classes and teaching start in earnest next semester. Currently I am focusing on getting the program to display all of the values from the various databases and put them together which will hopefully be done in a week. It should also allow the user to fiddle with the values and make selections although the user won't be able to save it at that point. After that I will probably put up a version of the code so that folks can flip through the weapon components quickly and get a feel for how the program will work.

Link to comment
Share on other sites

As a compromise between having extra stuff like this built in, maybe have a package of all the main modding things that emerge, (tools like this or skins/other adjustments etc... ) that you can install if youre interested in modding the game

On the editor itself, it's pretty cool looking , nice work :)

Link to comment
Share on other sites

Take a look at weapons_gc.xml when you get a chance. The ranges in the weapons.xml are used for display purposes only and don't really serve any function beyond that as far as I am aware. The values in the two files are definitely pretty incongruent with one another however, which is why it will be nice once I get this program finished.

Aaaaaaaaaaaah. Cheers! You wouldn't also know how to make the projectile frames stay in place until the projectiles hit? I wouldn't mind my lasers shooting beams. :D

Edit: Reflected on this a bit further.. since the game game uses an image intended for a specific direction for quite a few degrees, getting a beam to look good would be hard wouldn't it? Unless I used really thin images, and loads of them. Dunno how this would impact the game speed though..

Edited by IceVamp
Link to comment
Share on other sites

Aaaaaaaaaaaah. Cheers! You wouldn't also know how to make the projectile frames stay in place until the projectiles hit? I wouldn't mind my lasers shooting beams. :D

Edit: Reflected on this a bit further.. since the game game uses an image intended for a specific direction for quite a few degrees, getting a beam to look good would be hard wouldn't it? Unless I used really thin images, and loads of them. Dunno how this would impact the game speed though..

I agree that it seems unlikely that we would be able to do the beams ideally without somehow being able to access the games raw code. I just look at it this way, you don't see a bullet move through the air either, the purpose of that depiction is for clarity so you understand what happened.

The only option I can think of to make it seem more "beamy" would be to crank up the projectile's speed (which can be done although I don't have it depicted on the form). This would make the beam appear longer even though it wouldn't be. You would have to be careful about making it too fast though, because then it would look a bit transparent/ the colors would mix with what is displayed underneath the tile.

Link to comment
Share on other sites

Actually you can if you use tracer rounds. (Never mind that one usually loads every fifth round as a tracer. :P) But yeah, seems unlikely. If we want it proper. But how hard can it be for the engine to draw a line from point a to b, where a is gun and b is calculated point of impact? And make this work with the whole shooting mechanics.. Damn it Chris! *shake fist*

You think increasing speed will have that effect? I thought it would only play the frames faster, rendering the shot even harder to see. I'll try testing it. Thanks for the input!

Link to comment
Share on other sites

The speed setting just affects the speed at which the projectile travels between A and B. The projectile image is a static image, not an animated one (though I do have an animated plasma projectile I really should put in the game instead of the recoloured laser) so this will make it harder to see, but might give the effect of a laser beam. Try it.

Link to comment
Share on other sites

It's a bit wily. Some angles look better than others. I have it at 2500 now. BUT I fired a carbine burst, and those three bolts looked like a long bolt at those speeds. However I don't see any way to cheat this in at the moment as a single shot, since the single shot mechanism doesn't have a shot counter in weapons_gc. I could change the burst fire to be like.. 10 shots, doing 1/10 damage each, cost the same as a single shot, and multiply the magazine count by 10. But that would mess up the tactical side of having burst and single shots. And single shots would still be there to ruin it with their single bolt.. :P

I'm going to go pass out now.

Link to comment
Share on other sites

well you could just have the shotgun only shoot burst shots. Then perhaps you could have multiple burst accuracies?

Wait, can I put more than one burst shot on a weapon? To me it seems you can't use <BurstFire/> more than once? I need a deeper understanding than I have at the moment for this :P

You could just resize the laser images in the /projectiles/ folder to make them longer?

That was my first thought as well, but wouldn't that make the image go through the target? Does the engine calculate the edge of the image or more like the middle? Also, wouldn't I need to do editing on the amount of frames and stuff then as well? And I could only find the reference to the frames in the .xml files. But it's worth a shot I guess. :)

Link to comment
Share on other sites

no idea if multiple burst accuracies are possible, maybe that something that quatermaster or chris could add in?

Unfortunately it doesn't look like it is possible right now based on the setup of the XML document. Since there are no descendants of BurstFire it probably is impossible to simply add multiple burst aim settings. I agree that it would be nice if in the future the code was capable of handling it simply for modding purposes. Chris can give a more definitive answer, but just from the way the data is organized it looks unlikely.

Link to comment
Share on other sites

Multiple burst fire types is not possible at the moment. It's something we could add, but there's more important things for us to do right now :)

IceVamp - we've changed the way that the images work over the past few months. Right now the game just takes on master image (for the lasers its laser_e.png but you can check what it is by loading laser_spectre.xml or the equivalent for whatever projectile) and then rotates that to face whatever angle the bullet needs to travel at.

Thus you'll just need to stretch laser_e.png and update the laser_e spectre width (w=) and height (h=) values to reflect the changes you've made. If you don't update the width/height values then only part of the new image will appear.

Anyway, if you do give it a play, again it'd be helpful if you could write up your experiences somewhere on the wiki. I've no doubt someone will want to something similar in the future.

Link to comment
Share on other sites

Would be cool if you could add it somwhere down the line, if only to please the mod monkeys. :D

Ah, that's smart. I wasn't looking forward to fiddle with rotations myself. I'll give it a go and see if I can't write up some sort of projectile modding piece. Only 20 minutes left at work!

Link to comment
Share on other sites

Hmmm. As I suspected the image now passes through the target. Seems like the "end" of the image has to pass the point of impact. I've tried changing the frames from 50 to 1 both total and frametime, but doesn't seem to affect the animation at all. Both the spectre and the xml refers to something called "main" though.

<timeline name="main" frametime="1" totaltime="1">

<keyframe frame="1" />

</timeline>

<spectre id="rocket" version="1">

<state id="default" name="rocket" pivotX="30" pivotY="20" sortPoint="0.49">

<anim src="projectiles/laser/laser_e" anim="main"/>

</state>

Then there's that rocket part in the spectre, but I'm confident that is not the source of the difficulties.

I can only find one main.lua, and it seems to control something completely different, and certainly not animation frames.

I will investigate further, but feel free to provide suggestions!

Oh, and sorry for the thread hijack Quartermaster >.<

Edit: I am perplexed, any changes I make to laser_e.xml don't seem to apply at all.

Edited by IceVamp
Link to comment
Share on other sites

Maybe it would be useful to see how the animated projectiles work?

Chris did mention he had a plasma projectile so animation is possible at least.

If the position of new frames can be set you may be able to set new frames to appear behind the original.

If you could balance the speed of the projectile with the frame speed it would look like a beam at least.

Of course that may not be close to possible!

An alternative is if the engine can scale the projectile sprite on the fly perhaps?

Keep stretching it out until it registers as hitting something or passes its maximum range.

Link to comment
Share on other sites

Yeah, the problem right now is that the projectile doesn't seem to respond to changes in frames. As long as the keyframe is set to something else than 0, it behaves the same no matter what else I do. (At 0, there is no projectile.) But I see that weapons_gc calls a specter called /projectiles/laser/laser. Dunno if it the specter thingy then finds the file called laser_specter..

It's strange. I have done some animation, and I have a certain perception on how frames and stuff is supposed to work, but these .xml files defies my logic

Yeah, with the current way this is done, the game cannot stretch the image as I see it. (not a coder though, so I'm just doing this the science way. prod something and see what happens.)

Link to comment
Share on other sites

The way I read it was that the keyframe was the first frame in the animation.

If it only has one state then changing the number wouldn't have an effect.

That was why I was hoping Chris would post up the spectres for the animated projectile to get a better idea of how it works.

I prefer to take something apart to see how it works, or at least see a working version of something I have already broken...

Link to comment
Share on other sites

I thought so too. But as you say, they might be only for things with animation. Changing the frames here doesn't do anything.

In fact the only parameters that change what happens is the bold line;

<sequence name="laser_e.xml" source="./laser-red*.png">

<img regx="36" regy="0" name="laser_e" w="0" h="0" />

<framelist>

<frame regx="500" regy="-5" x="0" y="0" w="500" h="6" name="laser-red.png" />

</framelist>

<timeline name="main" frametime="50" totaltime="50">

<keyframe frame="1" />

</timeline>

</sequence>

And after a couple of hours (phew) I know what it does. regx and regy is where, along the shot's x and y axis the graphics will be positioned. while x and y is where along the images axis the image should be cropped.

In the example above the last pixel along the image's x axis will be right on top of the shot (image far left is 500, far right is 0). This will cause the laser beam to not overshoot it's target. Yay. However, the rest of the image is now "behind" the shot so that the "back" of the bolt is faar behind the shooter at the instant the shot is fired.

w="500" h="6" is just the dimensions of the image. I tried changing the width here to double to have a "blank" space to utilize, but no dice. It only needs to be the image dimension or larger. If it IS larger, nothing happens. The image is still 500. At least that is how I understand it.

In closing, one can't have too wide images for projectiles, as there is no way to make them "fit" with the shot the engine attaches them to at the moment. (Unless there is a file where this can be adjusted, but I haven't seen one.) I'll try to formulate this on the wiki for people interested in editing projectiles.

Link to comment
Share on other sites

Just wanted to give everyone a heads up that the program is progressing nicely. School started this last week so I have been a bit busy. I've changed the display quite a bit and I have significantly altered how the hidden side of the application is functioning. Have a good one and I hope that I will have something new to show everyone soon.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...