Usefulness

Request patches for Keens 1-3.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Usefulness

Post by levellass »

I just want to conduct a brief user-survey here.

How much do you think Adis' Sprite Patches and Patch Index are used? What makes them useful? What makes them not?

And finally, if I made a program to alter sprite behaviour (Whether or not Gargs charge, what bullets the tank bots shoot.) would anyone actually bother to use it? (It will be written in the only language I know, Quick Basic and will produce a patch file after the user has selected what they want done.)

I should hate to spend a lot of time making something that only I would use.
Stealthy71088
Posts: 583
Joined: Thu Mar 17, 2005 11:54 pm
Location: NY

Post by Stealthy71088 »

I use that patch index and sprite patches a lot- that's where I got the vast majority of my non-requested patches for Draggin Days and my new project. My "Keening" computer isn't hooked up to the internet, so I download/copy and paste stuff onto a USB Key, and bring it down to that computer.

Speaking of which, is the downloadable link for the patch index updated often? I noticed a lot of updates online that I don't have on my computer, and I don't really want to have to copy and paste everything.

I'm interested in the program. Is it a quick sprite patch maker, or does will it do something more complicated?
User avatar
XkyRauh
Posts: 1114
Joined: Sun Aug 31, 2003 9:14 pm
Location: San Diego, California

Post by XkyRauh »

Whenever CheesyDave is doing work on his mod(s), he will often ask me "Hey, where's the thread to the patch that...." and I always tell him to check the patch index. :) So I know it gets at least some use, in that fashion.

I think it's very well organized, too--the few times I've gone digging, I've found exactly what I wanted after just a few minutes.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Hmmm; I guess that downladable link needs a good updating; I'll suggest it to Adis when she gets back, a lot has been done recently.

The program will be simple enough, select a sprite to edit, select a behaviour you want to give that sprite, and a patch is made. (Due to the limitations of Quick Basic, the patcher will have to change a fre $xxxx strings into $xx $xx ones.)
Stealthy71088
Posts: 583
Joined: Thu Mar 17, 2005 11:54 pm
Location: NY

Post by Stealthy71088 »

levellass wrote:The program will be simple enough, select a sprite to edit, select a behaviour you want to give that sprite, and a patch is made. (Due to the limitations of Quick Basic, the patcher will have to change a fre $xxxx strings into $xx $xx ones.)
Sounds like it'll speed things up a lot. Does changing the strings require calculations, or is it just add a space and a $?
User avatar
XkyRauh
Posts: 1114
Joined: Sun Aug 31, 2003 9:14 pm
Location: San Diego, California

Post by XkyRauh »

Changing strings is easy. Say you've got the string $ABCD -- it'd become $CD $AB. Just cut it in half, and flip it around. :)
User avatar
CommanderSpleen
Posts: 1017
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Post by CommanderSpleen »

That's easy to automate in QB.

It's hard to say how useful this will be, especially with really flexible patches. However, anything you can successfully simplify would be helpful.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Well, we shall see. Xky, how do I automate ABCD-> CD AB in Quick Basic? If I could do that, then the user could just cut n' paste patches!

[This program I hope will make some very flexible patches, but i don't want to ruin the surprise.)
User avatar
CommanderSpleen
Posts: 1017
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Post by CommanderSpleen »

You just need to first divide by 255 (256?) to get xx00, and then modulus the same number to get 00xx. Output them as separate bytes in reverse order. Presto.
User avatar
XkyRauh
Posts: 1114
Joined: Sun Aug 31, 2003 9:14 pm
Location: San Diego, California

Post by XkyRauh »

Oh, man, I haven't coded QBasic since I was a teenager, but isn't there a way to read X amount of letters/numbers into a string? Let's say we've got a string variable called $addressToPatch, which in this case is equal to "ABCD" ... we'd use :

Code: Select all

$firstPart = MID$($addressToPatch,3,2)
$secondPart = MID$($addressToPatch,1,2)
PRINT $firstPart; $secondPart
...I think, anyway. I don't have QBasic to try this on, but the little research I did in 10 minutes made this sound like the right way. We read two letters starting from the 3rd byte (the C), to get the FirstPart, and then read two letters starting from the 1st byte (the A) to get the SecondPart. The formatting is like:

Code: Select all

MID$(string,whereToStart,howLong)
:) Hope that works!
Check this out, too: http://www.qbasicstation.com/index.php?c=t_adv&t=f_left
User avatar
CommanderSpleen
Posts: 1017
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Post by CommanderSpleen »

Indeed, if you're storing the values as strings then that'd be the way to go. The way I pointed out works with integers.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

I use the HEX$ function to convert between decimal numeric strings and hexadecimal alphanumeric strings.

What is modulus? and QB doesn't round when I divide by 256.

I'll look at Xky's method when I have the time.
User avatar
XkyRauh
Posts: 1114
Joined: Sun Aug 31, 2003 9:14 pm
Location: San Diego, California

Post by XkyRauh »

My method only works with strings... if you're doing any sort of math operations with your variables, you'll probably get an error. I think Spleen's gonna be the guy to go to for this :)
User avatar
CommanderSpleen
Posts: 1017
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Post by CommanderSpleen »

Modulus returns the remainder of a number after dividing it by the right-hand value. ie. 5 MOD 4 = 1.

It should round the value to the lower value (ie. discarding the lesser values), if you're using INTs. The only way I can see that you'd have a non-rounded value is if you use floating point variables. If all else fails, try dividing with \ instead of /. IIRK, \ rounds no matter what... but I don't remember whether that was QB, or even if it's a real memory.
User avatar
adurdin
Site Founder
Posts: 549
Joined: Fri Aug 29, 2003 11:27 pm
Location: Edinburgh, Scotland
Contact:

Post by adurdin »

CommanderSpleen wrote:IIRK
Does that stand for If I Remember Keenly?
\ rounds no matter what... but I don't remember whether that was QB, or even if it's a real memory.
Yes, in QB 100 / 3 will give 33.3333..., but 100 \ 3 will give 33.

I'm not sure why you'd need to do any calculations at all for the program as described, though. I would have thought you could just store the parts of the patch as strings and just wrote the right strings to the patch file to get the result selected.
Post Reply