Author |
Message |
Ehrenmann
Joined: Sat Oct 20, 2007 5:13 pm Posts: 61 Location: Somewhere with marijuana.
|
Help with offsets.
THIS IS NOW A QUESTION THREAD. Simply because I think it would be easier instead of making another topic.
Current question (HDFirearm); difference between parent offsets defined in the instance itself, and offsets when you're doing the code for the firearm and doing copy of.
Last edited by Ehrenmann on Sat Aug 16, 2008 6:47 am, edited 5 times in total.
|
Thu Aug 14, 2008 4:14 am |
|
|
uberhen
Joined: Wed Jan 24, 2007 11:53 pm Posts: 589 Location: Silicon Valley, California
|
Re: WHY MAI INDEX NO WORK?!
If you post the mod, I'll try to help you out.
|
Thu Aug 14, 2008 4:26 am |
|
|
Ehrenmann
Joined: Sat Oct 20, 2007 5:13 pm Posts: 61 Location: Somewhere with marijuana.
|
Re: WHY MAI INDEX NO WORK?!
Thank you, so much. Be warned though, my codes or sprites may or may not make your eyes and or brain melt.
//Edited with fixed index.
Last edited by Ehrenmann on Thu Aug 14, 2008 5:11 am, edited 1 time in total.
|
Thu Aug 14, 2008 4:30 am |
|
|
DSMK2
Joined: Fri Dec 28, 2007 4:19 am Posts: 1119
|
Re: WHY MAI INDEX NO WORK?!
Big question: Where is your Devices.ini in your Sniper.rte folder? Should be this: Code: DataModule IncludeFile = Sniper.rte/Devices/Ammo.ini IncludeFile = Sniper.rte/Devices/Sniper.ini
|
Thu Aug 14, 2008 4:41 am |
|
|
Ehrenmann
Joined: Sat Oct 20, 2007 5:13 pm Posts: 61 Location: Somewhere with marijuana.
|
Re: WHY MAI INDEX NO WORK?!
Wreh? Wait, so instead of including the folders, you include the files in the folders, unless the folders themselves are a different .rte?
Edit// Also, thank you DSMK2. Your code for DSTech really helped me figure out what was what.
Another edit// So now it's saying "Failed to load datafile object with following path and name
Sniper000"
Whut? I know the sprite is in there.
|
Thu Aug 14, 2008 4:47 am |
|
|
DSMK2
Joined: Fri Dec 28, 2007 4:19 am Posts: 1119
|
Re: Failed to load datafile object?
Change Sniper001 to Sniper000. Here 000 is the first frame, 001 is the second frame and vice versa. Also make sure the framecount = 1.
|
Thu Aug 14, 2008 6:40 am |
|
|
Ehrenmann
Joined: Sat Oct 20, 2007 5:13 pm Posts: 61 Location: Somewhere with marijuana.
|
Re: Failed to load datafile object?
So Sniper000 would be the frame when you're not shooting, and Sniper001 right as you shoot? Is it necessary the sprites be different? Also, that didn't fix it. Same error.
Thanks for helping, I've never been so good at computer stuffs.
|
Thu Aug 14, 2008 6:54 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Failed to load datafile object?
If the framecount is TWO, then two sprites (Sniper000 and Sniper001) would be required. Since the framecount is one, no numbers are needed at all.
Just name the image Sniper.bmp, and make the reference (ContentFile =) point to just Sniper.bmp.
|
Thu Aug 14, 2008 7:28 am |
|
|
Ehrenmann
Joined: Sat Oct 20, 2007 5:13 pm Posts: 61 Location: Somewhere with marijuana.
|
Re: Failed to load datafile object?
Yeah, I realized that. One of those "I'm feeling reeeeally stupid moments." Now for some reason though, when I'm loading it up, when it encounters an error it doesn't show me the screen that shows which line it had to abort at, and instead skips to that jargon about application error. I'm going to try re-booting and report back.
Edit:: Didn't help. I need that screen to finish fixing this. T_T Anyone have any ideas on how to get it back?
|
Thu Aug 14, 2008 9:17 am |
|
|
uberhen
Joined: Wed Jan 24, 2007 11:53 pm Posts: 589 Location: Silicon Valley, California
|
Re: Failed to load datafile object?
Got it loading. Here's what was wrong: • Many incorrectly spelled variables, spacing on some were off, some weren't capitalized. • You didn't define a magazine for your rounds! I added one. • The casing sprites weren't indexed in CC's palette. I fixed them. • Sprite names were wrong. You're supposed to define just the name of the sprite in the code, then you add 000 - 001, etc to the end of each images' names. So, you have "FilePath = Sniper.rte/Devices/Sniper.bmp," and you have actual image names of "Sniper000.bmp, Sniper001.bmp." • It's AutoGenerate, not Atomgenerate. • You need to fix the hand offsets to your own specifications; right now they're way off. • The gun doesn't fire anything. You might want to paste a working round into your Ammo.ini, then change it the way you like. • You didn't include a magazine sprite, so I substituted Null.bmp. It still needs a bit of work, but there shouldn't be any errors in the version I'm posting. You should keep on modding to familiarize yourself with the code, but in my opinion it would just be easier to use one of Azukki's templates.
|
Thu Aug 14, 2008 9:40 am |
|
|
Ehrenmann
Joined: Sat Oct 20, 2007 5:13 pm Posts: 61 Location: Somewhere with marijuana.
|
Re: No "Error at line #" or whatever screen?
Yeah, I got almost all the way through fixing all the typos, syntax, and spelling errors before my computer decided to be dumb and get rid of the screen that shows me the error. ANNOYING.
And where would I get one of these templates?
And yeah, I was just taking totally wild stabs in the dark with the offsets until I could take a look in CC and figure out where the offsets ended up. Thanks a lot for the help though.
|
Thu Aug 14, 2008 10:09 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: No "Error at line #" or whatever screen?
|
Thu Aug 14, 2008 6:54 pm |
|
|
Ehrenmann
Joined: Sat Oct 20, 2007 5:13 pm Posts: 61 Location: Somewhere with marijuana.
|
Re: No "Error at line #" or whatever screen?
So I'm still unclear on things like "gun000 gun001 gun002" and so on. I know that these are the alternate sprites when something happends, but is it when they shoot, or when they're reloading?
|
Thu Aug 14, 2008 10:00 pm |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: No "Error at line #" or whatever screen?
On HDFirearms, there are only two frames.
000.bmp is the default frame. When the gun is not firing, it displays this frame.
001.bmp is the "firing" frame. It will change to this frame and stay there as long as the gun is shooting.
|
Thu Aug 14, 2008 10:53 pm |
|
|
Ehrenmann
Joined: Sat Oct 20, 2007 5:13 pm Posts: 61 Location: Somewhere with marijuana.
|
Re: No "Error at line #" or whatever screen?
Once again, as soon as Grif says something, the issue is cleared. Okay. Now, another question. For things like StanceOffset, SharpStanceOffset, and SupportOffset, what do those mean? I'm guessing that they have something to do with where the actor's hands are on the gun, like support is the second hand that wouldn't be on the main hold, but I don't know about StanceOffset or SharpStanceOffset. Ugh, so many questions. I feel like I'm cheating. Also, for vectors, I know that X is the vertical coordinate and Y is the horizontal, but does it go by from the very center of the image, or the bottom? Also, it works in pixels, right?
Don't feel obliged to answer all these questions, I'll get them figured out eventually, I just want to make it go faster.
|
Thu Aug 14, 2008 11:06 pm |
|
|
|