[H]ACK REQUEST: A few simple cosmetic adjustments...

Chris H.'s Ultima / ACS-style game development system!

Moderators: Ice Cream Jonsey, joltcountry

User avatar
Garth's Equipment Shop
Posts: 638
Joined: Fri Dec 05, 2008 5:55 pm
Location: Festering Foothills
Contact:

[H]ACK REQUEST: A few simple cosmetic adjustments...

Post by Garth's Equipment Shop »

I could probably do this with a simple find and replace if I had access to the precompiled code but I probably don't have what I need to compile it.

I would like to change the term Level to Rank and the term Magic Points to Knowledge or Skill Points. MP to KP or SP, MPMAX to KPMAX or SPMAX... Oh and I want to change "CAST" to "USE KNOWLEDGE" or "USE SKILL" or something like that. Oh no, Use is already being used for USE ITEM so something similar... hmm... maybe PRACTICE SKILL OR APPLY KNOWLEDGE.

I guess Knowledge would be preferable to Skill because there is already weapon skill points and experience points which would cover the 'practice makes perfect' angle of character development. But for games in which knowledge and not magic is power I think having 'magic points' is extremely out of place and really just ruins the whole atmosphere I'm trying to create.

I've run into this problem quite a lot with RPG kits of all kinds. Most seem to cater primarily to fantasy oriented games and tend to forget about all the interesting non-fantasy possibilities that open up just by simply making the RPG engine use more ambiguous terms or even better, by allowing the game designer to choose the names of attributes and point variables.
Which of you is interested in my fine wares?

rld
Posts: 223
Joined: Sun Jan 25, 2009 2:17 am
Location: Dallas, TX

Re: [H]ACK REQUEST: A few simple cosmetic adjustments...

Post by rld »

I think you can get the effect of most of what you are looking for with the existing ACK build.
Garth's Equipment Shop wrote:I would like to change the term Level to Rank and the term Magic Points to Knowledge or Skill Points. MP to KP or SP, MPMAX to KPMAX or SPMAX... Oh and I want to change "CAST" to "USE KNOWLEDGE" or "USE SKILL" or something like that. Oh no, Use is already being used for USE ITEM so something similar... hmm... maybe PRACTICE SKILL OR APPLY KNOWLEDGE.
You can change the region skins to make the label for MP display as anything you want; so if you use a skin, just write "KP" or "SP" next to where the MP number normally displays.

On page 4 of the configuration editor, you can set the "USE" command to also handle the functions of "CAST" and "READY". So that way you can use spells/skills with the "USE" command.

You could also change the skin so that the command read "C:USE SKILL" if that works better.

The only sticking point, I think, is that the INFO screen will still refer to levels, MP, etc. If we had a way to make the 'I' command skip the info screen and go directly into the inventory, then you could implement an 'extra' command like STATUS which would display info however you wanted using a macro.

So I think that would be a useful feature to have - a setting in the configuration editor that makes the 'I' command display inventory only, without the intervening 'info' screen.

rld
Posts: 223
Joined: Sun Jan 25, 2009 2:17 am
Location: Dallas, TX

Re: [H]ACK REQUEST: A few simple cosmetic adjustments...

Post by rld »

Garth's Equipment Shop wrote:I could probably do this with a simple find and replace if I had access to the precompiled code but I probably don't have what I need to compile it.
Also, I think that Chris included the turbo pascal compiler along with his source release package, so I think all you have to do to make an edit is change the code and run a top-level batch file to recompile everything (running inside DOSBox). I haven't tried it, though; I just downloaded the source to poke around in it.

rld
Posts: 223
Joined: Sun Jan 25, 2009 2:17 am
Location: Dallas, TX

Post by rld »

I am assuming you are thinking about this in reference to the Metal Gear game, and I just had a random thought.

If you want to, you should be able to use the QTILE command to display the little 'rank' stars that indicate the player's level. I would use positions 7,8,9,10,11 to put them between the menu and the save/quit labels. Of course, if you do a skin, you could draw a dedicated box for them to appear in and even put a 'RANK' label next to it if you want.

Chris H
Posts: 272
Joined: Sun Dec 02, 2007 4:07 pm
Location: California, USA

Post by Chris H »

Yeah, the ACK source download requires nothing but DosBox, so you should be able to work with it on any platform and without needing any separate compiler. All you'll need is a text editor (myself I use notepad++)

In a more general sense: I'd love to somehow pull all of the prompts and whatnot out of the code and into a separate file, partly to allow this kind of customization, but also to allow localization. Most text strings would need to be the same number of characters, however, which might make things tricky.

User avatar
Garth's Equipment Shop
Posts: 638
Joined: Fri Dec 05, 2008 5:55 pm
Location: Festering Foothills
Contact:

Post by Garth's Equipment Shop »

Thanks for the workaround ideas rld. I'll try them.

@Chris - So I can still dl the source and it includes the compiler as well? Thats awesome. I hope "I would love to" will translate into "I did it!" ;) Its a great idea.
Which of you is interested in my fine wares?

joebonk
Posts: 112
Joined: Mon Aug 27, 2012 3:16 am
Location: las cruces, nm

hack request

Post by joebonk »

I was thinking of a good patch request. The ability to change the name of a usable item during game play. This way, during the plot, once an object has been used and that quest completed, a new object could take it's place. Also an object could obtain new properties. A crystal that has been 'powered up'. With patch commands, they could even have a new tile. So the crystal in one mission is a magic sword in another mission. It would allow for many more game usable objects. Sure this could expand terrain features as well.
For an Ultima style game, the runes that activate the shrines could all be one object. If each shrine is a mission and you wouldn't go on to the next until the first is done, then the name of the rune can change as each mission is completed. It is only one object for 8 missions.

Also I have terrian objects recycled with different tiles. They animate with alternative tile. Water in one map but lava in another. So I can't name them one or the other. Here would be a good use to have that object's name changed depending on what map you are on.

Another request is to change the map number during game play. I know portals can be changed with macros but if a town has 8 versions, depending on the path the character chose, then the amount of variables used to keep track of this all is a lot. But to be able to change the map number during game play will eliminate all that variable use. I would only use one variable (the state the world is in). In my latest game one is a god who can do bad things. But this is a minimal request. Can only image the complications involved. How easy it would be for someone to mess up. And portals injected with new a# b# c# and w# would cease to function. So maybe sticking to changing portal locations is the way to go. It would be cool to use the Skull of Mundain to alter the town map or world map and blast a town to bits.

Admiral Ackguh
Posts: 137
Joined: Sat Nov 03, 2012 11:26 am
Location: Canada
Contact:

Post by Admiral Ackguh »

For quest objects with no other purpose, you could use flags instead of ACK objects. This requires some programming, and knowledge of bitwise operations.

I was thinking of something like the Ultima runes. There are 8 of them, one for each flag, so you need to set aside 8 bits in a variable. Set them to zero in your intro macro. When the player finds a rune, use various macros (including the step macro) to set its flag to 1, and display a message for the user. The global step macro can also use QTILE as indicators for the rune flags. Finally, use portal or step macros for the shrines to prohibit entry if the player lacks the needed rune.

If you want, I can include sample code.
- A:A:

joebonk
Posts: 112
Joined: Mon Aug 27, 2012 3:16 am
Location: las cruces, nm

Post by joebonk »

I would really appreciate the sample code as I have not seen any example of the bit wise commands on the forum. 8 bits for 8 possibilities is a great increase. I was thinking of setting aside one object for all missions to be played one at a time. And this object can change often. But if only 8 bits in a variable, then maybe more then one object, which would allow for more free roaming on the map. And portals prevent entry if the bit isn't set to what it needs. And the alternative tiles (in a subfolder), can be switched in to change the appearance of the object being recycled.

The only other way I thought to simulate objects missions is to have a small section in the screen bmp called "quest item". And have a blank box when not having one, but make an object there when there is a quest going on. But this is in some way borders on tacky. Not that I wouldn't use it:)

Admiral Ackguh
Posts: 137
Joined: Sat Nov 03, 2012 11:26 am
Location: Canada
Contact:

Post by Admiral Ackguh »

joebonk wrote:I would really appreciate the sample code as I have not seen any example of the bit wise commands on the forum.
The examples are on these pages:

http://www.joltcountry.com/phpBB2/viewtopic.php?t=6450

http://www.vaughns-1-pagers.com/compute ... s-of-2.htm
8 bits for 8 possibilities is a great increase. I was thinking of setting aside one object for all missions to be played one at a time. And this object can change often. But if only 8 bits in a variable, then maybe more then one object, which would allow for more free roaming on the map. And portals prevent entry if the bit isn't set to what it needs. And the alternative tiles (in a subfolder), can be switched in to change the appearance of the object being recycled.
Setting aside one object is a good idea, but you need to call it something generic like "QUEST OBJECT", and while you can change its appearance, you can't change its name. For my ultima example, it would be called "RUNE", and placed where the runestones are supposed to be placed. The step macro can examine the INV[] for this object, and if greater than 0, set it back to 0, and set the appropriate flag bit (based on current location.)
The only other way I thought to simulate objects missions is to have a small section in the screen bmp called "quest item". And have a blank box when not having one, but make an object there when there is a quest going on. But this is in some way borders on tacky. Not that I wouldn't use it:)
You could also use QTILE, as I suggested, which would also use up only one tile for four objects. QTILE is a command described in the ACK Manual, and it means display quarter tile at one of 16 screen locations. You'll have to set aside a few normal tiles and divide them into quarters (8x8 pixels) for these icons.
- A:A:

Admiral Ackguh
Posts: 137
Joined: Sat Nov 03, 2012 11:26 am
Location: Canada
Contact:

Bit Mask Numbers

Post by Admiral Ackguh »

Before I continue, I should post these lists of bit mask numbers useful for bitwise operations, particularly flags.

(Moderator, if you want, I can copy this message to a new one, and you can link to it, as a tutorial, from ACK Documentation, Online References, etc.)

Variables A-G and A2-G2 are 8-bit ones, holding values of zero to 255. Since they are 8-bit, they can contain up to 8 one-bit flags, with the following masks:

Code: Select all

BIT    A     B
00     1   254
01     2   253
02     4   251
03     8   247
04    16   239
05    32   223
06    64   191
07   128   127
BIT = bit number, starting from 0.
A = decimal mask value, used for setting and testing. (Power of 2)
B = inverse mask value, used for clearing. (255 minus A)
  • To set bit 4 in variable C:
    SET C = C | 16
    To clear bit 6 in variable G2:
    SET G2 = G2 & 191
    To test bit 1 in variable F:
    IF F & 2 THEN ...
    To clear all bits of variable B2:
    SET B2 = 0
    To set all bits of variable B2:
    SET B2 = 255
If you need to use the other variables (H-Z and H2-Z2), they are 16-bit, going from 0 to 65535:

Code: Select all

BIT      A        B       C
00       1    65534      -2
01       2    65533      -3
02       4    65531      -5
03       8    65527     -10
04      16    65519     -17
05      32    65503     -33
06      64    65471     -65
07     128    65407    -129
08     256    65279    -257
09     512    65023    -513
10    1024    64511   -1025
11    2048    63487   -2049
12    4096    61439   -4097
13    8192    57343   -8193
14   16384    49151  -16385
15   32768    32767   32767
   (-32768)
BIT = bit number, starting from 0.
A = decimal mask value, used for setting and testing.
B = inverse mask value, used for clearing. (65535-A)
C = inverse mask value as negative number.

Note that the ACK macro editor displays numbers greater than 32767 as negatives, using the formula C = B - 65536. You need to type in the number as a positive one from column B, but it displays as a negative one from column C.

Usage is much the same as with the 8-bit variables, except that setting all bits means setting to 65535. For an example, to test bit 12 of Q2:

IF Q2 & 4096 THEN ...

To use variables efficiently, make a list of all flags needed in the game, set aside however many variables are needed, and assign each flag to a specific bit from these variables. You need to make a list somewhat like this, and store it on paper or in your documentation text file:

Code: Select all

Variable I2 - Game Progress Flag
   1   0   talked to everyone in town
   2   1   met elven ranger
   4   2   have part 1 of magic key
   8   3   have part 2 of magic key
  16   4   have part 3 of magic key
  32   5   rescued Sarah
  64   6   rescued Harry
 128   7   exited Purple Tower by gate
 256   8   met defector
 512   9   killed two-headed troll
1024  10   stamped by gandalf
2048  11   endgame bomb found
4096  12   endgame bomb placed
8192  13   endgame bomb detonated
- A:A:

User avatar
Garth's Equipment Shop
Posts: 638
Joined: Fri Dec 05, 2008 5:55 pm
Location: Festering Foothills
Contact:

Post by Garth's Equipment Shop »

Awesome work Admiral! Thanks for sharing that. Linking to your post now. Oh I see I must have already done it some time ago lol.

Post Reply