Jump to content

Photo

Please help me with drawing scripted meters, assigning extra buttons &


  • Please log in to reply
87 replies to this topic

#16 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 17 May 2015 - 12:17 PM

 

binx,  i wasn't really paying attention when i posted my previous comment.  probably should have been sleeping instead of prowling the forums...

 

anyways, now i see you actually made tiles for the various percentages.  you could use these, but i'm sure it'll be less efficient than the previous method discussed.  every frame you'd have to run various if/else statements to determine which tiles to draw.

 

it looks like you have 10 tiles for the end caps, and 16 tiles for the middle of the bars.  i'm not sure how many tiles wide the middle of the bar is.  lets say 5 because that would make an even 100% (10+10+(16x5)).  you'd have an if block like this,

const int HP_METER_FULLEND = 0;  // tile number of first full end cap (the 100% tile)
const int HP_METER_EMPTYEND = 0 ; // tile number of first empty end cap (the 0% tile)
const int HP_METER_MID = 0; // tile number of the first mid tile
 
int tile2draw;
int hpPercent = (Link->HP / Link->MaxHP) * 100;
 
if(hpPercent > 90)
{
 tile2draw = HP_METER_FULLEND + (hpPercent - 100);
 
 // use the actual Screen->DrawTile or Screen->FastTile for this, i'm just gonna just pseudo code because i don't know all your values
// drawTile HP_METER_EMPTYEND
// drawTile HP_METER_MID x 5
// drawTile tile2draw
}
else if(hpPercent < 10)
{
 tile2draw = HP_METER_EMPTYEND + (hpPercent - 10);
 // as above with pseudo code
 // drawTile tile2draw
 // drawTile (HP_METER_MID+16) x 5
 // drawTile HP_METER_FULLEND+10
}
else
{
 int numFull = Floor( (hpPercent - 10) / 16);
 tile2draw = HP_METER_MID + ((hpPercent - 10) % 16);   // i think this math is wrong, but hopefully you get the idea
 // as above with pseudo code
 // drawTile HP_METER_EMPTYEND;
 // drawTile HP_METER_MID * numFull
 // drawTile tile2draw
 // drawTile HP_METER_FULLEND+10
}

 

Indeed, you can do it with tiles. It's just not as efficient, or modular, as it would require future questmakers to set up tiles, assign them all to constants, and so forth; which most people wanting various gauges just love to do; and unless I'm mistaken, this is going into his header.

 

Drawing tiles that move, and shrink, every frame, especially en masse, can also cause lag.

 

Rectangles, or lines, over static tiles, are treated as single game elements, and even they can cause lag on impotent hardware. I've seen stacked draw commands eat 4-5 FPS on one of my netbooks.


Edited by ZoriaRPG, 17 May 2015 - 12:19 PM.


#17 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 17 May 2015 - 12:17 PM

Just saying, but of course it would've been possible to use the tiles you've drawn instead of rectangles if you really wanted. Screen->FastTile() lets you draw tiles from the tile page.

	/**
	* Optimized and simpler version of DrawTile()
	* Draws a single tile on the current screen much in the same way as DrawTile().
	* See DrawTile() for an explanation on what these arguments do.
	*/
	void FastTile( int layer, int x, int y, int tile, int cset, int opacity );

Your script would have to be rewritten though.


Edited by Avataro, 17 May 2015 - 12:18 PM.


#18 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 17 May 2015 - 12:22 PM

 

binx,  i wasn't really paying attention when i posted my previous comment.  probably should have been sleeping instead of prowling the forums...

 

anyways, now i see you actually made tiles for the various percentages.  you could use these, but i'm sure it'll be less efficient than the previous method discussed.  every frame you'd have to run various if/else statements to determine which tiles to draw.

 

it looks like you have 10 tiles for the end caps, and 16 tiles for the middle of the bars.  i'm not sure how many tiles wide the middle of the bar is.  lets say 5 because that would make an even 100% (10+10+(16x5)).  you'd have an if block like this,

const int HP_METER_FULLEND = 0;  // tile number of first full end cap (the 100% tile)
const int HP_METER_EMPTYEND = 0 ; // tile number of first empty end cap (the 0% tile)
const int HP_METER_MID = 0; // tile number of the first mid tile
 
int tile2draw;
int hpPercent = (Link->HP / Link->MaxHP) * 100;
 
if(hpPercent > 90)
{
 tile2draw = HP_METER_FULLEND + (hpPercent - 100);
 
 // use the actual Screen->DrawTile or Screen->FastTile for this, i'm just gonna just pseudo code because i don't know all your values
// drawTile HP_METER_EMPTYEND
// drawTile HP_METER_MID x 5
// drawTile tile2draw
}
else if(hpPercent < 10)
{
 tile2draw = HP_METER_EMPTYEND + (hpPercent - 10);
 // as above with pseudo code
 // drawTile tile2draw
 // drawTile (HP_METER_MID+16) x 5
 // drawTile HP_METER_FULLEND+10
}
else
{
 int numFull = Floor( (hpPercent - 10) / 16);
 tile2draw = HP_METER_MID + ((hpPercent - 10) % 16);   // i think this math is wrong, but hopefully you get the idea
 // as above with pseudo code
 // drawTile HP_METER_EMPTYEND;
 // drawTile HP_METER_MID * numFull
 // drawTile tile2draw
 // drawTile HP_METER_FULLEND+10
}

 

Meh, I already finished the subscreen, anyways, so no big deal, it's perfectly passable.

To be honest, I wouldn't bother using all those counters. You may need them later down the line for in-built functions, and your primary use here seems to be all scripted. You can update counters regularly to keep any in sync with an array index:

For example, if you have three currency types, for three regions, you can assign a single counter to diSplay currency, and only assign the proper currency type to it, based on player location. Copper, silver, and gold, I presume follow one of the standard AD&D value systems. In which case, your player probably won't need to see them constantly. If you're n ot automatically up-sizing the coins, then tracking them at all times is extraneous, because the player will only need to see them when spending, or banking them. You could display those in menus, or only on screens where a shop script is running, and otherwise move them to the active subscreen, so that a player can check therm when they're required.

My own subscreen is a chore, because of all the counters I originally used. I literally ran out of ZC internal counters, before I starting moving all my game vars into arrays.

Food, drink, and so forth, don't require inbuilt counters, as they use no inbuilt features of ZC. You can draw a gauge for them based on a strict percentage, with a tiny bit of math; and tie that to whatever game variables array you're using, so that you don't eat up a counter. Updating from the array is no more difficult. The basic formula, if you make bars 100px long, is:

% = (MAX_VALUE / 100 ) * PRESENT_VALUE

Thus, if you make a very simple function to update an array element BAR_LENGTH, you can call that from draw commands easily.
You can also use the line draw command, instead of rectangle, should you wish, and use the scale argument to widen it. I'm not certain, but I believe that lines are less likely to bog down ZC than rectangles, and given that you will have at least six drawn at all times, it may be prudent to optimise them. I'm going to be using lines as gauges for certain items in LoE, that are only shown when that item is equipped.

I was also planning to kill my ammo counters, and draw ammo counts with character drawing commands, so that only relevant information is seen during the action; but is available on a custom active subscreen, or in Inventory menus at any time.

I happen to like your passive design there too, however, many people will probably say that it's cramped, as they did with mine. Most people have difficulty tracking all their counters as-is...

One other thing to note, is that you can draw metres over the normal display too. I would suggest doing that with the stamina metre, maybe even drawing a small line near the PC at all times, so that people don't die by forgetting to check it. One thing you could do there, is to make a 'pie' gauge with tiles. Eight or ten segments, and have them fall away (by advancing the tile) and draw that somewhere that the player is always likely to be looking.

As long as you are scripting your subscreens, you may also want to ditch the in-built minimap, and draw minimap graphics in a translucent display on the bottom left of the screen, with an option to toggle them on, and off. That will give you more passive subscreen canvas, if you need it.

Using arrays instead of counters is also handy if you want to use for loops:



That's a template for how to draw many bars simultaneously, with one global function to draw them, and one to update their size. The functions allow the input of a specific bar (int bar) if the boolean 'all' is set false, or they will use an array input as 'int bar', and process the entire table if the boolean 'all' is set true.

Warning: This is between versions, and it may include typos, or other minor flaws. I'm pretty sure that I spotted a few, as I changed some values while making it, and I wrote that specifically to apply to this thread. PZC also ate it the first go, so here's round two.

You can see how the table would allow for expansion as needed, and the values can be set from anywhere. In theory, you could allow the player to change the X/Y coordinates to a number of presets.

Because the coordinates are stored in an array, that updates them based on a value also stored in the same array, you can tie them to any object's coordinates, including NPCs, the player, or anything else, and have them move with that object.

Note that you could do vertical bars with a slight modification of these functions:



I believe these should occur after Waitdraw() so that they are as current as possible.

 

I'm not sure what you mean by me needing the counters for in-game functions. There are 25  script counters, I'm only using 15 of them, so I still have 10 left over for other things. I used counters because it's an easy way to track the various meters. As far as the coinage is concerned, they're not different currencies for different regions, but like you said, follow AD&D rules: 1 gold piece is worth 10 silver, and 1 silver piece is worth 10 copper. I was going to try to add a function to split the space in any wallet so that  if you have, say the 999 rupee wallet, you can have 999 coins, but once you reach 999, you can't carry anymore coins of any kind, so you could end up with 54 gold, 338 silver and  607 copper, any you'd be maxed out, but if you spent all the copper, and replaced it with gold, you'd still have 999 coins, but they'd be worth more. I left them on the HUD mostly because I, personally, like always being ale to see how much money I have. The meat, ale and bread I totally disagree about. They're active items that you have to consciously consume, so they need counters so that you can keep up a stock. But, I did take their icons off the subscreen. but that still leaves me with the problem of where I *am* going to draw counters for active items like the food, bombs and arrows, since their icons don't fit. Like I said earlier, if I can draw the counter over the "B" button item,and still have it always show the right counter, or nothing if the item doesn't use a counter (like how counter-based items are handled in later games, like in OoT and later, you didn't have a counter on the HUD for bombs  or arrows, the counter was laid over the item sprite), that will make my subscreen pretty much perfect, in my eyes. I put the stamina bar between the health and magic meters specifically because I don't want people to miss it. It's right between the two meters everyone keeps their eyes on. Right now, the biggest issues I can think of are: "What is a fair drain rate?" and "what should I set for the initial random roll?" because 3d6 is just too low to be anything but crippling if the player gets a bad roll (I rolled a 3 on my first test), and even a good roll isn't very nice. I changed the roll to 10D6, but I worry that 60 Stamina might be a bit much to start. I mean, going the Ultima route and making you consume food with every step is freaking ridiculous, but I definitely want food to play a major roll (get it? cuz a roll is a type of food, and this is a role-playing game. It's a pun!), since if you don't eat in real life, you die.   

 

Also, I figured it was possible to do it with the tiles, but the rectangle way sounded easier.


Edited by Binx, 17 May 2015 - 12:27 PM.


#19 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 17 May 2015 - 12:22 PM

Just saying, but of course it would've been possible to use the tiles you've drawn instead of rectangles if you really wanted. Screen->FastTile() lets you draw tiles from the tile page.

	/**
	* Optimized and simpler version of DrawTile()
	* Draws a single tile on the current screen much in the same way as DrawTile().
	* See DrawTile() for an explanation on what these arguments do.
	*/
	void FastTile( int layer, int x, int y, int tile, int cset, int opacity );
Your script would have to be rewritten though.

 

 
If the colours of the metres are CSet based, FastCombo allows you to cheat some free tile space too. I've actually managed to run ZC out of free tile pages in the past.
 
I'm going to put in some paragraph formatting in the quote, Binx, I think PZC gobbled it...

Meh, I already finished the subscreen, anyways, so no big deal, it's perfectly passable.

I'm not sure what you mean by me needing the counters for in-game functions. There are 25  script counters, I'm only using 15 of them, so I still have 10 left over for other things. I used counters because it's an easy way to track the various meters. As far as the coinage is concerned, they're not different currencies for different regions, but like you said, follow AD&D rules: 1 gold piece is worth 10 silver, and 1 silver piece is worth 10 copper.

 
I quite literally ran out, using them to track stats, afflictions, and other goodies. A single array can work in exactly the same way, and doesn't use any in-built space that I may want for something that requires it later.
 

As an anecdote, in the original D&D, and AD&D, the exchange rate was not 10:1, 10:1, 1:1; it was 12:1, 20:1, 1:1, just like the proper old pence, and shillings. Thus, 240 pence to the sovereign, or 12 pence to a shilling, or 20 shillings to a sovereign.

 

You're certainly going to need banking systems, and custom shopkeeps that will change up coins, and you may want to do what i did, and include a message on an item pickup script, if the player has no free space, as the counter values aren't summing their free space at present, merely the value of the objects, and when the counters cease to increase, a player will undoubtedly be left confused, and think the game is broken; as we both know that people here love to read instructions before trying a game.
 
 

 

I was going to try to add a function to split the space in any wallet so that  if you have, say the 999 rupee wallet, you can have 999 coins, but once you reach 999, you can't carry anymore coins of any kind, so you could end up with 54 gold, 338 silver and  607 copper, any you'd be maxed out, but if you spent all the copper, and replaced it with gold, you'd still have 999 coins, but they'd be worth more. The meat, ale and bread I totally disagree about. They're active items that you have to consciously consume, so they need counters so that you can keep up a stock.


I didn't even notice a 'food' counter. I was talking about the stamina gauge itself... If it was always hovering near the player, and shifted colours when it ran down, they would be more conscious of it than on the subscreen. Shocking, I know, but people don't pay much attention to the passive subscreen while playing.

 

Watch some LPs, and learn the basic mindset, as I constantly see people go out of their way to pick up items that can;t even hold, fo frequently, that I made it a point to add an array in LoE to hold the value of each object a player picks up that they cannot carry ( UselessItems[] ) so that at the end of the game, I can display it with a string, as Z3 did with enemy kills.

 

Money

I wouldn't tie how much a person can carry to coin value at all. From any standpoint, that makes no sense. Make it 999 max coins, of any summed value. If your base coinage is silver, with 1sp = 1 rupee, that would be a wallet capacity of 9,990 rupees, but if gold is hard to find--not a random drop--it limits grinding by making it unprofitable.

 

In other words, you can use an inbuilt counter to track up to 999 objects, and if that counter is maxed, the pick-up script on an item refuses to add it to a counter. That's close to what I did, save that it doesn't permit fractional space, but it will require a pick-up script for money, rather than just using the item editor counter increase field.

 

Doing it this way is more complex, but far more realistic; and I've never seen any RPG where a player couldn't put a 20,000 gold gem in their pocket because it was worth too much; although I know few players foolish enough to do it, unless they want to be the latest marks.

 

You'll want to avoid any spillover problems, and you'll need functions that auto-tally for shoppes, but aye, my method is somewhat different, and you have all the ingredients you need to do something that is just as effective, in another manner, but it requires scrapping many ZC models. How would a person spend 1/10 rupee, with the in-built shoppes? They can't, and if 1cp is 1/10 of the basic money unit, you need to account for that.

 

This is why I say, use a float array, because that can be a proper-pretend-float, and you can write out its value to a counter by converting the ZC-float of the summed total, to a ZC-int, and print that value out on the screen, whether by means of copying it to a counter, or with draw commands. Otherwise, you're going to need to base all your prices around the cp, and you'll run into large numbers that ZC can't handle as ints.

 

My money objects store their size in an array, and the 'free space' value in that array is mirrored to a counter so that I can put it on the active subscreen. That's the only spot in the entire game to which you can't directly draw, and the place for where I've reserved counters, although at this stage, I mayn't use it; but I need to reserve it so that other people may use it for the sake of simplicity.
 

But, I did take their icons off the subscreen. but that still leaves me with the problem of where I *am* going to draw counters for active items like the food, bombs and arrows, since their icons don't fit. Like I said earlier, if I can draw the counter over the "B" button item,and still have it always show the right counter, or nothing if the item doesn't use a counter (like how counter-based items are handled in later games, like in OoT and later, you didn't have a counter on the HUD for bombs  or arrows, the counter was laid over the item sprite), that will make my subscreen pretty much perfect, in my eyes.


As to drawing:
 
Screen->DrawInteger
 
This allows you to put the value stored in an array, or a counter as an int, onto the screen, wherever you desire. It needn't be in the passive subscreen field at all. You can easily store, update, and draw it every frame. You can have it follow the player around, if you desire. My point, i suppose, is that if you use a draw function to place the value, you don;t need a counter. If you want it on the in-built active subscreen, then and only then, is a counter mandatory.

 

I put the stamina bar between the health and magic meters specifically because I don't want people to miss it. It's right between the two meters everyone keeps their eyes on. Right now, the biggest issues I can think of are: "What is a fair drain rate?" and "what should I set for the initial random roll?" because 3d6 is just too low to be anything but crippling if the player gets a bad roll (I rolled a 3 on my first test), and even a good roll isn't very nice. I changed the roll to 10D6, but I worry that 60 Stamina might be a bit much to start. I mean, going the Ultima route and making you consume food with every step is freaking ridiculous, but I definitely want food to play a major roll (get it? cuz a roll is a type of food, and this is a role-playing game. It's a pun!), since if you don't eat in real life, you die.

...

 

I've always had a simple philosophy: Roll a character, and play it, with all the imperfections intact, but in a video game, people will simply cheat at the start, and make multiple characters until they have one that is 'perfect'. That's precisely why I pegged all starting stats at 10, and made increases occur after X levels. Once a player has an investment in a character, they won't want to start over.

 

You may want to put in a sound when the player is very low on stamina too.

 

As to a fair drain rate, slave it to a day and night cycle. I'm assuming here that you have day and night in your game world, so every day and night without food should shave off a huge slice of stamina, and maybe some stat damage after a while too. If you want to become inventive, make stamina a float, make every swing of a sword slice off .0010 stamina, and convert the raw factor back to an int later, so that players who run around like mad dogs, batting at everything, tire out the PC.

 

The drain will rack up over time, without being drastic. That's the value of being able to store the proper and true value as a float, and put the integer portion in a counter, or what-have-you. Pure magic.


Edited by ZoriaRPG, 17 May 2015 - 12:58 PM.


#20 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 17 May 2015 - 12:28 PM



If the colours of the metres are CSet based, FastCombo allows you to cheat some free tile space too. I've actually managed to run ZC out of free tile pages in the past.

See, I think that's more likely than me running out of counters. I seem to need a LOT of extra tiles...



#21 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 17 May 2015 - 01:09 PM

See, I think that's more likely than me running out of counters. I seem to need a LOT of extra tiles...

 

I was writing my response to your reply above, in editor mode, as I posted my earlier comment, at about the same time as your reply; them shifted to edit it when I saw your new post, to save forum space. It's a post-race, marathon this afternoon, or so it seems to my failing eyes.

 

I do wish for more tile pages though: I wanted to avoid 16-colour tiles, and do everything in 8-bit, but that presents some difficulties in terms of available space. One of my stumbling points in LoE, is the palette. I designed it to provide specific tones, but not around CSet shifting, which means that I will inevitably need to go back, make a new palette, or use another one (and modify it), then re-colour al of my custom graphics. Lovely fun, that is.

 

The reason that I ran out of counters, was because I was displaying present, and maximum statistics, and other game variables; so each counter type, used two counters for display purposes. One to show the present value, and another to show its maximum. As an example, one counter holds present health (CR_LIFE), and another (SCRIPT_1) would hold MAX_HP, as there's no way to display an MCounter in numeric format without using draw commands, and no way to draw to the active subscreen either, so it was just wasteful.

 

Then, I needed two or three for XP, and two or three for money; in each case, because of the counter cap, to display numbers large enough to be usable. In doing this, they run out quite rapidly.

 

Now I'm essentially using them only to track counted game objects, and storing everything else in tables. Custom tables also allow custom functions based on reading tables, which is handy. If you look at the function I wrote (above) for simultaneous display of status bars, you'll see why I wouldn't use a counter for that information. One for loop displays everything, and updates it every frame: Neat, and tidy; and drawn wherever I bloody well like. :)

 

P.S. Note, that DrawInteger can draw ZC floats too, with the 'number_decimal_places' arg set to '2' to display tenths, and hundreths. Thus, if you set gold, silver, and copper to store as a float in a table, you could print 123.4 to the screen for silver (showing silver, and copper), or 12.34 for gold (showing gold, copper, and silver), instead of 1234 copper pieces.

 

P.P.S. AD&D also had Electrum coins, valued between silver, and gold; and they are something that I put into LoE. I also recall having farthings, and halfpence, in games, but I don't believe they were ever in a book.


Edited by ZoriaRPG, 17 May 2015 - 01:17 PM.


#22 justin

justin

    Adept

  • Members

Posted 17 May 2015 - 03:01 PM

Binx, you can have the vanilla system display a counter over your B button item on the passive subscreen as long as you aren't using the quest rule to select both A/B buttons. You stack however many counter objects over the B button item as you want to display. Set them to not display zero and only when selected.

You can use the following script if both A/B are selectable, or as an alternative to the above vanilla method.
http://www.purezc.ne...=scripts&id=144

#23 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 17 May 2015 - 05:02 PM

Binx, you can have the vanilla system display a counter over your B button item on the passive subscreen as long as you aren't using the quest rule to select both A/B buttons. You stack however many counter objects over the B button item as you want to display. Set them to not display zero and only when selected.

You can use the following script if both A/B are selectable, or as an alternative to the above vanilla method.
http://www.purezc.ne...=scripts&id=144

 

He is, indeed, using the A+B system, and in addition, he's mapping Ex button items. That said, you can DrawInteger over the passive subscreen by determining which item is in each slot, and using a function to draw a mock counter over the item. Pretty easy that is.



#24 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 17 May 2015 - 05:26 PM

Actually, I'm NOT using the A+B system, currently. Swords are automatically assigned by which dummy item you equip (or they will be,once I've scripted that subscreen)



#25 justin

justin

    Adept

  • Members

Posted 17 May 2015 - 05:53 PM

He is, indeed, using the A+B system, and in addition, he's mapping Ex button items. That said, you can DrawInteger over the passive subscreen by determining which item is in each slot, and using a function to draw a mock counter over the item. Pretty easy that is.


Weren't you just talking earlier in this thread that excessive draw functions cause lag? And now your solution is to use more draw functions? Did you even look at the script I linked? I know you didn't read my post because I gave solutions for only B and A/B. telling me he's using mapped Ex buttons also has no bearing on the question I'm currently answering, I know he has mapped Ex buttons I read it earlier in this thread.

#26 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 18 May 2015 - 04:00 AM

Weren't you just talking earlier in this thread that excessive draw functions cause lag? And now your solution is to use more draw functions? Did you even look at the script I linked? I know you didn't read my post because I gave solutions for only B and A/B. telling me he's using mapped Ex buttons also has no bearing on the question I'm currently answering, I know he has mapped Ex buttons I read it earlier in this thread.

 

No, no. I mean to draw characters quite literally, over items, with either a transparent effect, or transparent background; and yes, I read your code. For whatever reason, setting a counter object on a passive subscreen to a background colour of 00, does not render the character with no background (to overlay it), which is the desire that I got out of that particular request. (Essentially, a more modern HUD with overlay counters.)

 

I know of no way to render transparent/overlay text counters, without using drawing functions; but if one exists, that would be nice.

 

Draw commands can cause lag, but it greatly depends on the use. The larger the object that is drawn, and updated, or the complexity, or number of objects to update; the more lag you may potentially create. If you want to achieve unusual effects, it's a price you need anticipate to accomplish them, and it'd best to use the draw commands to achieve your goal that are the least likely (of all available) to cause frame-dropping.

 

For the record, mapping those buttons is an important concern, as if you want to overlay counters for any active button item, you'll need to store its game datum, and while equipped to that button, use that information, to either (1) write to a counter to display, or (2) draw directly.

 

If displaying standard counters, you'd do pretty much what you did with SetCountersAB(), except you'd need to fetch the ItemData from wherever it's stored for X/Y button items, and you'd use two more counters in the process.


Edited by ZoriaRPG, 18 May 2015 - 04:01 AM.


#27 justin

justin

    Adept

  • Members

Posted 18 May 2015 - 07:35 AM

Again if you'd read what we were talking about instead of rambling on at length in an opposite direction you would have seen that the Ex buttons in Binx's quest are for jumping and talking - neither of those things need counters overlaid. The solution I posted from the vanilla editor will work just fine and require no extra counters. If you couldn't achieve a transparent background you were doing it wrong. As for actually mapping to the Ex buttons, you answered that, good on you.

Edited by justin, 18 May 2015 - 07:36 AM.


#28 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 18 May 2015 - 12:42 PM

Again if you'd read what we were talking about instead of rambling on at length in an opposite direction you would have seen that the Ex buttons in Binx's quest are for jumping and talking - neither of those things need counters overlaid. The solution I posted from the vanilla editor will work just fine and require no extra counters. If you couldn't achieve a transparent background you were doing it wrong. As for actually mapping to the Ex buttons, you answered that, good on you.

Actually, he's right. Text elements on the subscreen don't have an "overlay" (or "transparent") checkbox, so there's no way to give them an actually transparent background, you have to make their background color match the background color of the subscreen, itself. Probably to avoid people overlaying text on things that make it hard to read.  I was actually planning on seeing about using draw functions for the DMap title (the problem there being that I'm not sure how I can call the DMap title, or how to then write it as a string), since the default "minimap title" element is too wide and always interferes with the map graphic.



#29 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 18 May 2015 - 02:55 PM



Actually, he's right. Text elements on the subscreen don't have an "overlay" (or "transparent") checkbox, so there's no way to give them an actually transparent background, you have to make their background color match the background color of the subscreen, itself. Probably to avoid people overlaying text on things that make it hard to read.  I was actually planning on seeing about using draw functions for the DMap title (the problem there being that I'm not sure how I can call the DMap title, or how to then write it as a string), since the default "minimap title" element is too wide and always interferes with the map graphic.

Correct, but I wasn't going to argue that point indefinitely: There is literally no style element for transparency in the counters sub-tabs.

 

(If there is some way to make them transparent, please do illuminate us.)

 

That's precisely why I suggested the above, and for the record, what I suggested does work. DrawInteger is also not a frame-heavy operation, as I've proven on more than two occasions.

 

Regarding the X/Y buttons: I could not actually read that text there.

 

Until justin said that was a 'Jump' button, I thought it was an item of some kind. May I suggest using a pair of icons, perhaps of boots, and an eye, for jump, and look; or something along those lines, instead of text there, for those of us with not-so-fantastic eyesight?

 

The other text...I can guess it says 'Check" ?...looked sort of like a sawblade, or a key. It's pretty clumped together... I'm guessing you put it there as an aesthetics thing, and as a reminder to make both buttons hot, but I think icons would be better, as they would achieve the same goal.

 

In fact, people will see 'The Evil Eye', or an Illuminati eye, depending on how one might depict it, say 'Hmm..what does this do?', and try it. Muahahah...

 

 

If you want it, Binx.

 

As for fetching the DMAP name, there's:

Game->GetDMapName(int DMap, int buffer[]);

Using that, you can print the DMAP name with a sprintf or something; and you may want to note the cousin functions:

Game->GetDMapTitle(int DMap, int buffer[]);
Game->void GetDMapIntro(int DMap, int buffer[]);

They do what it says on the tin.


Edited by ZoriaRPG, 18 May 2015 - 03:34 PM.


#30 justin

justin

    Adept

  • Members

Posted 18 May 2015 - 03:40 PM

ya, no way to make it transparent with the vanilla subscreen editor

 

http://i.imgur.com/OLAieBj.png




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users