https://rpg.hamsterrepublic.com/ohrrpgce/api.php?action=feedcontributions&user=Msw188&feedformat=atomOHRRPGCE-Wiki - User contributions [en]2024-03-28T08:50:40ZUser contributionsMediaWiki 1.39.6https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:Plan_for_turn-based_battles&diff=27464Talk:Plan for turn-based battles2012-08-16T21:21:52Z<p>Msw188: </p>
<hr />
<div>[[User:The Mad Cacti|The Mad Cacti]] <sup>([[User talk:The Mad Cacti|talk]])</sup>: I'm going to be very pleased when this is implemented, halting the endless requests!<br />
<br />
Regarding attack delays: delays are also used as animation delays as well as for penalties, right? So it seems like a loss to reinterpret it as number of turns delayed or a factor in determining turn order rather than adding new options for those.<br />
<br />
[[User:Bob the Hamster|Bob the Hamster]] <sup>([[User talk:Bob the Hamster|talk]])</sup>: That us a good point. Delays (even if only intended for animation) are inappropriate for turn-based battles-- but simply disabling delays in turn-based and adding new separate number-of-turns-delayed data would be less confusing than trying to give two different purposes to the same data.<br />
<br />
[[User:The Mad Cacti|The Mad Cacti]] <sup>([[User talk:The Mad Cacti|talk]])</sup>: Animation delays are inappropriate for turn based battles? I don't understand.<br />
<br />
[[User:Bob the Hamster|Bob the Hamster]] <sup>([[User talk:Bob the Hamster|talk]])</sup>: Hmmm. maybe we aren't talking about the same thing. I am just talking about the delay value for chained attacks. I would expect it to be ignored for turn based battles. delay as a value in number of ticks doesn't belong in turn based battles because turn-taking is not measured in ticks, it is measured in terms of every character and enemy having done one action. Attack animations of course, still happen in ticks, I am not saying that part is inappropriate for turn based battles. I just mean the attack delay before the first attack starts, and the attack delay in between each part of a chain.<br />
<br />
[[User:Bob the Hamster|Bob the Hamster]] <sup>([[User talk:Bob the Hamster|talk]])</sup>: ... but thinking about it even more, there is no good reason to disable delays. Delays in chains are used as dramatic pauses, and those still make just as much sense in turn based battles. I think I understand now :)<br />
<br />
--[[User:Msw188|Msw188]] ([[User talk:Msw188|talk]]) 14:20, 16 August 2012 (PDT): In trying to interpret attack delays for turn-based battles, the first thing that comes to my mind, and seems most similar to their use in active-battles, would be to use attack delays in the equation that determines what characters take their actions first. So the equation could be something like ACTION INITIATIVE := CHAR SPEED - ATK DELAY, then the actions in the turn happen in order of decreasing attack initiative (with some possible randomization). Then if there is a chain, each attack in the chain inherits the attack delay of all the previous attacks. That is, if atk1 chains to atk2, then when atk1 is run, atk2 is queued into the initiative chain (can't be put in at the beginning of the battle, because the chain might fail) with atk2 ACTION INITIATIVE := atk1 ACTION INITIATIVE - atk2 ATK DELAY. Does this make sense?</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:Plan_for_turn-based_battles&diff=27463Talk:Plan for turn-based battles2012-08-16T21:20:38Z<p>Msw188: An idea on attack delays for turn-based battles</p>
<hr />
<div>[[User:The Mad Cacti|The Mad Cacti]] <sup>([[User talk:The Mad Cacti|talk]])</sup>: I'm going to be very pleased when this is implemented, halting the endless requests!<br />
<br />
Regarding attack delays: delays are also used as animation delays as well as for penalties, right? So it seems like a loss to reinterpret it as number of turns delayed or a factor in determining turn order rather than adding new options for those.<br />
<br />
[[User:Bob the Hamster|Bob the Hamster]] <sup>([[User talk:Bob the Hamster|talk]])</sup>: That us a good point. Delays (even if only intended for animation) are inappropriate for turn-based battles-- but simply disabling delays in turn-based and adding new separate number-of-turns-delayed data would be less confusing than trying to give two different purposes to the same data.<br />
<br />
[[User:The Mad Cacti|The Mad Cacti]] <sup>([[User talk:The Mad Cacti|talk]])</sup>: Animation delays are inappropriate for turn based battles? I don't understand.<br />
<br />
[[User:Bob the Hamster|Bob the Hamster]] <sup>([[User talk:Bob the Hamster|talk]])</sup>: Hmmm. maybe we aren't talking about the same thing. I am just talking about the delay value for chained attacks. I would expect it to be ignored for turn based battles. delay as a value in number of ticks doesn't belong in turn based battles because turn-taking is not measured in ticks, it is measured in terms of every character and enemy having done one action. Attack animations of course, still happen in ticks, I am not saying that part is inappropriate for turn based battles. I just mean the attack delay before the first attack starts, and the attack delay in between each part of a chain.<br />
<br />
[[User:Bob the Hamster|Bob the Hamster]] <sup>([[User talk:Bob the Hamster|talk]])</sup>: ... but thinking about it even more, there is no good reason to disable delays. Delays in chains are used as dramatic pauses, and those still make just as much sense in turn based battles. I think I understand now :)<br />
<br />
--[[User:Msw188|Msw188]] ([[User talk:Msw188|talk]]) 14:20, 16 August 2012 (PDT): In trying to interpret attack delays for turn-based battles, the first thing that comes to my mind, and seems most similar to their use in active-battles, would be to use attack delays in the equation that determines what characters take their actions first. So the equation could be something like ACTION INITIATIVE := CHAR SPEED - ATK DELAY, then the actions in the turn happen in order of decreasing attack initiative (with some possible randomization). Then if there is a chain, each attack in the chain inherits the attack delay of all the previous attacks. That is, if atk1 chains to atk2, and atk1 has delay 10 and atk2 has delay 15, then when atk1 is run, atk2 is queued into the initiative chain (can't be put in at the beginning of the battle, because the chain might fail) with ACTION INITIATIVE := atk1 ACTION INITIATIVE - atk2 ATK DELAY. Does this make sense?</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:Contributors&diff=25625Talk:Contributors2010-10-29T23:46:48Z<p>Msw188: </p>
<hr />
<div>[[User:Pkmnfrk|Mike C.]] orly? When did ysoft get commit privleges?<br />
<br />
[[User:The Mad Cacti|The Mad Cacti]]: I'm guessing after he asked yesterday. But now I'm interested: what documentation is he writing? :)<br />
<br />
----<br />
[[User:Bob the Hamster|Bob the Hamster]]: Wait a second... Is MCW a typo for MSW? Or are they separate people?<br />
<br />
[[User:Msw188|Msw188]]: No, MSW is not MCW. I think MCW stands for Multi-Colored Wizard from back in the day, but I don't really know. MSW does not have svn commit privleges, because he really doesn't know how to program at all. All he does is ask for stuff (occasionally politely) and write stuffy help files.</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:Old_Plotscripting_Tutorial&diff=24818Talk:Old Plotscripting Tutorial2010-01-08T16:43:04Z<p>Msw188: another important typo, I assume; this page is clearly one that must be patrolled daily for misuse</p>
<hr />
<div>[[User:Yoshiboy|Yoshiboy:]] I think i'm gonna start converting (by convert I mean copy and pasteing) the old plotscipt tutor into this wiki, but do you think, we should put all thechapters on sperate pages like the HOWTO? Then people could add ideas for plotscript Chapters too, but thats kinda what the FAQ is for...<br />
<br />
[[User:Bob the Hamster|Bob the Hamster]] 10:52, 11 June 2006 (PDT) for now, why don't we leave the plotscripting tutorial as one page. We can still insert sections if we want, and maybe later, if it gets too big, we can split it up into howto-style chapters.<br />
<br />
[[User:The Mad Cacti|The Mad Cacti]]: Hssed is still my preferred HSS editor! It has that high-tech Info screen and everything! The only things it's missing is a shortcut to (un)comment a block of text, and maybe new syntax support. I haven't compiled my scripts from within Hssed in years, so don't miss that.<br />
<br />
[[User:Bob the Hamster|Bob the Hamster]]: Before you begin plotscripting, it is important to check whether or not computers have been invented yet. Most historians agree that the first computers were built in the 1940's, but the precise year is debatable, so if you ''are'' in the 1940's be sure to check your calendar carefully. Also, check to make sure that you live at a time when electricity is readily available, because for most of the history of the earth it has '''not''' (lightning being an obvious, but impractical exception)</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Plan_for_bigger_walkabouts&diff=24636Plan for bigger walkabouts2009-10-28T19:04:49Z<p>Msw188: /* Concerns/Things To Be Careful About */ lower and upper might have been confusing</p>
<hr />
<div>Right now, walkabout sprites are limited to 20x20.<br />
<br />
What if we simply added a new sprite type<br />
<br />
.PT9 big walkabouts 32 x 40 x 12 640 x 12 = 7680<br />
<br />
The size would be the same as hero graphics (for the benefit of people who want to synch battle/walkabout graphics FF6-style). There would be 3 frames in each direction.<br />
<br />
Or alternatively we might go with<br />
<br />
.PT9 big walkabouts 40 x 40 x 12 800 x 12 = 9600<br />
<br />
Which could still be used the same way, but would allow for squarish "boss" npcs with only minor pixel wasteage.<br />
<br />
In the NPC editor, and the hero editor we would add an additional data element for walkabout sprite size 0=small, 1=large. (this would work just like the sprite size setting for enemies)<br />
<br />
Big NPCs would be drawn on the map with their bottom center in the same place as the bottom-center of small NPCs. There would be no special passability considerations for big walkabout sprites, they would still use 20x20 passability squares. (any change to that behavior would belong in [[Plan for non-tile-based walking]])<br />
<br />
Ideally we want some future version to allow total flexability in sprite sizes, but this plan would be super-easy to implement, and would only add a very small additional backcompat burden (no worse than what already exists for enemy graphics)<br />
<br />
[[Image:Genesis-big-walkabout-mockup.png]]<br />
<br />
<br />
== Concerns/Things To Be Careful About ==<br />
<br />
*Layering - If two such sprites pass each other by only one vertical tile apart, then the top half of the 'southern' sprite should probably be drawn over the bottom half of the 'northern' sprite, regardless of heroes being drawn over NPCs or vice versa<br />
<br />
*Map borders - Are there extra concerns for trying to draw the sprite on the top line of a wraparound map? What should be done at the top of a cropped map?<br />
<br />
*Passability expectations - Certainly for tall characters the expectation would be to stick with 20x20 passability squares determined by the bottom half of the sprite. But authors may interpret 'big walkabouts' to mean that they can make a 'big' bed with only one NPC, and expect the bed to contribute a wall on both of it's tiles. 'Tall' may be a better word to use than big, or perhaps there need to be further considerations. Maybe the choice in the NPC Editor ought to explicitly explain that a 'large' NPC (I'm really thinking 'tall' would be a better word) is only considered as standing on the tile of its bottom half.<br />
<br />
*Plotscripting - Don't forget to update 'read NPC' and 'alter NPC'<br />
<br />
=See Also=<br />
* [http://www.slimesalad.com/forum/viewgame.php?t=3182 Newbie Newtype's demo of plotscripting this with slices]</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Plan_for_bigger_walkabouts&diff=24635Plan for bigger walkabouts2009-10-28T19:04:00Z<p>Msw188: Just trying to be careful</p>
<hr />
<div>Right now, walkabout sprites are limited to 20x20.<br />
<br />
What if we simply added a new sprite type<br />
<br />
.PT9 big walkabouts 32 x 40 x 12 640 x 12 = 7680<br />
<br />
The size would be the same as hero graphics (for the benefit of people who want to synch battle/walkabout graphics FF6-style). There would be 3 frames in each direction.<br />
<br />
Or alternatively we might go with<br />
<br />
.PT9 big walkabouts 40 x 40 x 12 800 x 12 = 9600<br />
<br />
Which could still be used the same way, but would allow for squarish "boss" npcs with only minor pixel wasteage.<br />
<br />
In the NPC editor, and the hero editor we would add an additional data element for walkabout sprite size 0=small, 1=large. (this would work just like the sprite size setting for enemies)<br />
<br />
Big NPCs would be drawn on the map with their bottom center in the same place as the bottom-center of small NPCs. There would be no special passability considerations for big walkabout sprites, they would still use 20x20 passability squares. (any change to that behavior would belong in [[Plan for non-tile-based walking]])<br />
<br />
Ideally we want some future version to allow total flexability in sprite sizes, but this plan would be super-easy to implement, and would only add a very small additional backcompat burden (no worse than what already exists for enemy graphics)<br />
<br />
[[Image:Genesis-big-walkabout-mockup.png]]<br />
<br />
<br />
== Concerns/Things To Be Careful About ==<br />
<br />
*Layering - If two such sprites pass each other by only one vertical tile apart, then the top half of the 'lower' sprite should probably be drawn over the bottom half of the 'upper' sprite, regardless of heroes being drawn over NPCs or vice versa<br />
<br />
*Map borders - Are there extra concerns for trying to draw the sprite on the top line of a wraparound map? What should be done at the top of a cropped map?<br />
<br />
*Passability expectations - Certainly for tall characters the expectation would be to stick with 20x20 passability squares determined by the bottom half of the sprite. But authors may interpret 'big walkabouts' to mean that they can make a 'big' bed with only one NPC, and expect the bed to contribute a wall on both of it's tiles. 'Tall' may be a better word to use than big, or perhaps there need to be further considerations. Maybe the choice in the NPC Editor ought to explicitly explain that a 'large' NPC (I'm really thinking 'tall' would be a better word) is only considered as standing on the tile of its bottom half.<br />
<br />
*Plotscripting - Don't forget to update 'read NPC' and 'alter NPC'<br />
<br />
<br />
=See Also=<br />
* [http://www.slimesalad.com/forum/viewgame.php?t=3182 Newbie Newtype's demo of plotscripting this with slices]</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=How_do_I_make_a_wall_that_heroes_can%27t_pass,_but_NPCs_can%3F&diff=24593How do I make a wall that heroes can't pass, but NPCs can?2009-10-12T17:54:52Z<p>Msw188: Began as a grammatical edit, but I tried to clear a bit up as well</p>
<hr />
<div>{{revise}}<br />
There is no easy way to create a wall that blocks heroes but not NPCs. To achieve this effect as the engine currently stands, one would have to make extensive use of relatively complicated plotscripting. The simplest way would probably be to have an on-keypress plotscript that checks the location of the hero and prevents the hero from moving through certain tiles via the suspend player command, while not affecting NPCs or the wallmap at all. For help constructing such a plotscript, try asking on the [[forums|various community forums]].<br />
<br />
=See Also=<br />
<br />
*[[How do I prevent an NPC from wandering far away from its start location?]]<br />
<br />
[[Category:FAQ]]<br />
[[Category:Stuff that can't be done]]</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=How_do_I_make_a_wall_that_heroes_can%27t_pass,_but_NPCs_can%3F&diff=24592How do I make a wall that heroes can't pass, but NPCs can?2009-10-12T17:52:59Z<p>Msw188: Is this enough?</p>
<hr />
<div>{{revise}}<br />
There is no easy way to create a wall that blocks heroes but not NPCs. To achieve this effect as the engine currently stands, one would have to make extensive use of relatively complicated plotscripting. The simplest way would probably be to have an on-keypress plotscript that checks the location of the hero could prevent the hero from moving through certain tiles, while not affecting NPCs at all. For help constructing such a plotscript, try asking on the [[forums|various community forums]].<br />
<br />
=See Also=<br />
<br />
*[[How do I prevent an NPC from wandering far away from its start location?]]<br />
<br />
[[Category:FAQ]]<br />
[[Category:Stuff that can't be done]]</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Items&diff=24591Items2009-10-12T17:41:21Z<p>Msw188: links should be added</p>
<hr />
<div>{{revise|Pictures should be added to clarify a few things; various words should link to relevant pages; NOTE in Basics section needs answered and removed}}<br />
== Introduction ==<br />
<br />
Items are pretty simple to understand for the most part, although they do have some quirks to them. From the player's point of view, an item is anything that the player can access through the Item menu from the main menu while playing a game. From the author's point of view, any item is just a special link to either an attack or a text box, and/or a piece of equipment. The author can define up to <s>254</s> 32000 different items {{WIP|inline}}, all with a unique name and ID number. Each one of these items can be assigned its own unique attributes (such as what text box to link to) through the Item Editor in custom.<br />
<br />
== Basics ==<br />
<br />
Defining items is easy. Go into the Item Editor from custom's main menu and use the up and down arrow keys to pick the ID number you want to use, and hit enter. You will bring up a menu for the item. You should first give the item a name. Item names can only be eight characters long, so make good use of special characters from your font (press CTRL+SPACE to see your available font characters). Once an item is named, it can be referred to in all other menues (and plotscripts) by ID number or name. Here we can also assign text as "Info". This is the text the player will see when they have their cursor on this item, either in their menu or in a shop.<br />
<br />
Items in and of themselves cannot 'do' anything. If you want an item use to trigger an action, that action has to be defined as an attack. So to make items heal or hurt you need a corresponding attack defined in the attack editor. Then you can assign the item to use the attack either in battle, out of battle, or both. If you want the attack to be used out of battle, make sure it has the "usable outside of battle" bitset turned onin the Attack Editor. Items can also be assigned to call a textbox out of battle. This is done using negative numbers (moving to the left) in the "When Used Out Of Battle" selection.<br />
<br />
There is a third use supported for items. They can be assigned to "Teach a spell". The assignment is an attack defined in the attack editor. This will make it so that when the player uses the item out of battle, it brings lets him choose a hero to try to teach the assigned attack to. If the hero is able to learn the attack (has it defined in a spell list in the hero editor), he will do so. Otherwise nothing will happen. NOTE: If an item is assigned an out of battle use AND a spell teaching use, I am not sure which takes priority in game. Someone should update this, or I will when I get the time to try it out.<br />
<br />
<br />
== Value and Consumption ==<br />
<br />
Items have the special privilege of being available to shops (standard OHR shops cannot sell other things like attacks, for example, though they can sell items that teach them). Every item can be assigned a standard "Value" in the Item Editor that will be the default cost of the item in every shop that has it available. Every item's sell-back price will likewise default to one half of its assigned Value. Both of these prices can be altered on a shop-by-shop basis in the Shop Editor however, so these values are only defaults. Also, they are not automatically visible to the player outside of a shop where they are being bought or sold. If you want the player to know this "Value", you should list it in the "Info" text.<br />
<br />
Items also can be assigned a standard consumption rate. There are three choices, and they can be cycled through on a line about half-way down the list in the Item Editor, which will default to "Unlimited Use". The other two choices are "Consumed By Use" and "Cannot be Sold/Dropped". These are pretty self-explanatory, but one should note that "Cannot Be Sold/Dropped" automatically implies "Unlimited Use". There is no simple way to prevent a player from being able to 'drop' an item, and at the same time have it be consumed if he uses it. For suggestions on this see the bottom of this page, -Advanced Item Techniques-. Another thing to note is that all of this is based on using the item through the menu, NOT on using it as equipment, which will be explained next.<br />
<br />
== Items as Equipment ==<br />
<br />
Any item can be set to be equippable in one (and only one) of the five equipment slots. If the item is a weapon, then it can also be assigned a graphic and palette, a handle point (to match with the handle point assigned in the weapon graphic editor), and a "When Used as a Weapon" attack. This attack must be defined in the attack editor, and it will be the hero's standard attack in all battles where this weapon is equipped. Using an item as equipment in this way does not consume the item (currently there is no way to have a weapon be consumed by its own use as a regular attack).<br />
<br />
As long as an item is equippable in any of the five slots, it can be assigned "Stat Bonuses". In this way equipment can affect any stat, both positively and negatively. It can also be assigned "Equipment Bits", which basically endow certain elemental effects upon the wearer. This does NOT affect an elemental weapon's attack. To do that you should make the relevant attack have an elemental bitset in the attack editor. Finally, an equippable item needs to be told what heroes can equip it in the "Who Can Equip?" menu. Note that none of this information (stats, bits, or who can equip) is visible to the player highlighting the item in game. If you would like the player to know these things, you should find a way to show this information in the "Info" text for that item.<br />
<br />
<br />
== Item Tags ==<br />
<br />
Every item can affect tags in four ways. The four designations are pretty self-explanatory, except that ownership of an item is fulfilled whenever the item is either in the inventory OR is equipped (equipped items do not count as being in the inventory). You should not give the same tags to more than one item. Also note that assigning tags here in the Item Editor does NOT name the tags. To do that you should go to the Tag Editor and name the relevant tags.<br />
<br />
<br />
== What Item's Cannot Do ==<br />
<br />
Items cannot be assigned to call plotscripts. However, they can call a textbox that itself is set to call a script instead of itself all the time. Unfortunately, this means they can never pass arguments to a script.<br />
<br />
Items are used and sold one at a time. However, without plotscripting, items cannot be dropped by the player one at a time. There should never be a need for this kind of functionality in a standard OHR RPG, because...<br />
<br />
There is no easy way to limit the number of items a player can carry, even with plotscripting. The standard item menu in game has a LOT of room, and items are grouped in one slot up to 99 at a time. If a player acquires more than 99, the items in question begin a new group in a new slot. Thus the player should never have a need to throw one of anything away.<br />
<br />
Equipped items are not considered part of the inventory. That means that equipped items cannot be used in the item menu, and thus cannot use their "When Used In Battle" attack at all unless they are unequipped BEFORE the battle. This is because equipment cannot be changed during a battle.<br />
<br />
Items, like attacks, are not very flexible. Once defined in custom, they cannot be altered in any way mid-game via plotscripts (contrast with things like Maps and NPCs which can be plotscripted on the fly). In addition, although plotscripts can refer to items by name, they cannot read any other data about them directly from the RPG file. If you would like to know, say, the attack ID that a certain item uses outside of battle in the middle of a plotscript, you have no choice but to manually construct a scripted 'lookup table'.<br />
<br />
<br />
== Advanced Item Techniques ==<br />
<br />
Although items cannot pass arguments to scripts, different items can be set to call different text boxes which call different scripts. In this way one can, in theory, have a separate plotscript for every single item, and thus handle any and all item use outside of battle with scripts. This can allow many fancy techniques like items that only work on certain maps, or that have random effects outside of battle (no such functionality inside of battle), and plenty of other things.<br />
<br />
One thing that you can use the above scripting idea for is to force "Cannot Be Sold/Dropped" items to be consumed on use. Have the item call a textbox that calls a script that performs the desired function (although this is rarely easy) and then deletes one instance of the item. Once again, this does not work in battle, unless you are willing to get into some very heavy "Instead of Battle" and "After Battle" plotscripts.<br />
<br />
The "inventory(Item:name)" command can be used to determine how many of an item is in the player's inventory, although there is no easy way to count equipped copies of the item. There is also no easy way of discovering things like what item the player last used, or was last obtained. Saving the current state of the inventory is a fairly massive task that requires setting aside global variables for every defined item in the game, even if the player does not have them.</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:What_is_a_string_and_how_do_I_use_it%3F&diff=24582Talk:What is a string and how do I use it?2009-10-07T05:27:20Z<p>Msw188: Hmm, maybe this article should wait</p>
<hr />
<div>If people approve of my answer to 'what is a script argument', I will try to write up a similarly formatted page for this question. Of course, and suggestions on improvement are welcome (I guess this ought to go in the other talk page.--[[User:Msw188|Msw188]] 03:59, 25 September 2009 (UTC)<br />
<br />
Go for it. --[[User:Bob the Hamster|Bob the Hamster]] 01:14, 27 September 2009 (UTC)<br />
<br />
In response to TMC's concerns about such an article and the differences between 'strings' and 'plotstrings' and 'text slices' and 'Wonder Bread' and everything else: I'm just gonna approach the article from a non-programmer standpoint as best I can. It seems to me to be the best way to respond to someone asking what a string is. A programmer-based answer would better be put on a page about the source and/or development plans, or maybe in answer to an FAQ more like "How are strings implemented in Hamsterspeak, and whose idea was it to do it like this anyhow?"<br />
<br />
I hope to have a roughdraft of this article by tonight or tomorrow, but I'm not on a deadline or anything, haha--[[User:Msw188|Msw188]] 18:40, 5 October 2009 (UTC)<br />
<br />
Forgot to ask - is there still only 32 string IDs available in plotscripting? Is that limit meaningful at all, or will it probably disappear soon?--[[User:Msw188|Msw188]] 18:41, 5 October 2009 (UTC)<br />
<br />
Okay, I tried beginning this thing, but gave up and decided that I'd better ask about something here first. I think I'm stuck on what TMC was trying to warn me about - what are the words we want to use for various things? In particular, as I was typing, I was trying to distinguish between a few things:<br />
*The ID number and/or slot that contains some text (I was calling this 'the string', and comparing it to a variable name)<br />
*The symbols stored at the ID number (I was calling this 'text', and comparing it to the number stored in a variable)<br />
<br />
What should I be referring to these two concepts as? Actually, the correct question would be 'we', because I believe the word "string" is used for both in various places throughout the wiki.<br />
<br />
I also noticed that the string $-operators are not documented on the plotdict, or at least are not easily findable.--[[User:Msw188|Msw188]] 13:39, 6 October 2009 (UTC)<br />
<br />
I would call the ID number "string ID" or "string slot number". I would avoid comparing it to a variable name. As for the symbols stored at the ID number, I would call this the "text" or the "string data". I would also avoid comparing this to a variable (although, yes, it is like a variable). The limit of 32 string ID's is not likely to be increased right now. For string display, you can already use a practically unlimited number of string slices, and for string storage, there will eventually be real string variables. The current string ID slots will remain in existence, but only for back-compat. As for the $ operators, I think TMC wants to remove them entirely (although they might stay around for backcompat too) --[[User:Bob the Hamster|Bob the Hamster]] 15:55, 6 October 2009 (UTC)<br />
<br />
Wait, if the data is called text, but the ID is called string ID, what does the actual word "string" signify? As I read your response Mr. the Hamster, I can't help but begin to feel that perhaps I am not the best person to be writing this article, and perhaps the article should just wait until slices and string-variables are officially implemented. It sounds like you basically want to rework the basic concept of how to use strings and even what we will mean when we use the word.--[[User:Msw188|Msw188]] 05:27, 7 October 2009 (UTC)</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:What_is_a_string_and_how_do_I_use_it%3F&diff=24576Talk:What is a string and how do I use it?2009-10-06T13:39:38Z<p>Msw188: Important questions</p>
<hr />
<div>If people approve of my answer to 'what is a script argument', I will try to write up a similarly formatted page for this question. Of course, and suggestions on improvement are welcome (I guess this ought to go in the other talk page.--[[User:Msw188|Msw188]] 03:59, 25 September 2009 (UTC)<br />
<br />
Go for it. --[[User:Bob the Hamster|Bob the Hamster]] 01:14, 27 September 2009 (UTC)<br />
<br />
In response to TMC's concerns about such an article and the differences between 'strings' and 'plotstrings' and 'text slices' and 'Wonder Bread' and everything else: I'm just gonna approach the article from a non-programmer standpoint as best I can. It seems to me to be the best way to respond to someone asking what a string is. A programmer-based answer would better be put on a page about the source and/or development plans, or maybe in answer to an FAQ more like "How are strings implemented in Hamsterspeak, and whose idea was it to do it like this anyhow?"<br />
<br />
I hope to have a roughdraft of this article by tonight or tomorrow, but I'm not on a deadline or anything, haha--[[User:Msw188|Msw188]] 18:40, 5 October 2009 (UTC)<br />
<br />
Forgot to ask - is there still only 32 string IDs available in plotscripting? Is that limit meaningful at all, or will it probably disappear soon?--[[User:Msw188|Msw188]] 18:41, 5 October 2009 (UTC)<br />
<br />
Okay, I tried beginning this thing, but gave up and decided that I'd better ask about something here first. I think I'm stuck on what TMC was trying to warn me about - what are the words we want to use for various things? In particular, as I was typing, I was trying to distinguish between a few things:<br />
*The ID number and/or slot that contains some text (I was calling this 'the string', and comparing it to a variable name)<br />
*The symbols stored at the ID number (I was calling this 'text', and comparing it to the number stored in a variable)<br />
<br />
What should I be referring to these two concepts as? Actually, the correct question would be 'we', because I believe the word "string" is used for both in various places throughout the wiki.<br />
<br />
I also noticed that the string $-operators are not documented on the plotdict, or at least are not easily findable.--[[User:Msw188|Msw188]] 13:39, 6 October 2009 (UTC)</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=DT6&diff=24574DT62009-10-05T18:47:57Z<p>Msw188: Quick grammar I happened to notice while reading things I don't understand</p>
<hr />
<div>This lump is one of two containing attack data. Each attack is treated as a single block of data. The first 40 INTs of each record are stored in .DT6, the remainder are stored in records [[ATTACK.BIN]], which is resizeable using [[BINSIZE.BIN]]<br />
<br />
In the loadattackdata sub in loading.bas, the attack data is combined into a single INT array. The complete specification combining data from both lumps follows. Offsets are in INTs from the start of the combined attack data.<br />
<br />
{| border="1" cellpadding="1"<br />
|bgcolor="#D0D0D0"|Grey fields are obsolete or unused.<br />
|-<br />
|bgcolor="#FFC8C8"|Pink fields are data that is only used in the latest development [[What is a WIP?|WIP]] version<br />
|}<br />
<br />
== Complete Attack Data Formal Specs ==<br />
[[About Formal Specs]]<br />
{| border="1" cellpadding="1" style="font-family:Courier New"<br />
! Offset || Data || Meaning<br />
|-<br />
|0||INT (1)||Animation picture<br />
|-<br />
|1||INT (1)||Animation palette, or -1 for default<br />
|-<br />
|2||INT (1)||Animation pattern:<br />
0 = Cycle forward<br>1 = Cycle backward<br>2 = Oscillate<br>3 = Random<br />
|-<br />
|3||INT (1)||Target Class:<br />
0 = Enemy<br><br />
1 = Ally excluding dead<br><br />
2 = Self<br><br />
3 = All<br><br />
4 = Ally including dead<br><br />
5 = Ally excluding self<br><br />
6 = Revenge (last hit)<br><br />
7 = Revenge (whole battle)<br><br />
8 = Previous target<br><br />
9 = Recorded target<br><br />
10 = Dead allies (heroes only)<br><br />
11 = Thankvenge (last to cure attacker) {{WIP|inline}}<br><br />
12 = Thankvenge (whole battle) {{WIP|inline}}<br />
|-<br />
|4||INT (1)||Target Setting:<br />
0 = Focused<br>1 = Spread<br>2 = Optional spread<br>3 = Random focus<br>4 = First target<br><br />
|-<br />
|5||INT (1)||Damage Equation:<br />
0 = Normal: Atk - Def*.5<br>1 = Blunt: Atk*.8 - Def*.1<br>2 = Sharp: Atk*1.3 - Def<br>3 = Pure Damage<br>4 = No Damage<br>5 = Set target stat to (100+extra damage)% of Max<br>6 = Set target stat to (100+extra damage)% of Current<br />
|-<br />
|6||INT (1)||Aim Math:<br />
0 = Normal: Aim*4 vs Dog<br>1 = Poor: Aim*2 vs Dog<br>2 = Bad: Aim vs Dog<br>3 = Never misses<br>4 = Magic: Mag vs Wil*1.25<br />
|-<br />
|7||INT (1)||Base Attack Stat:<br />
0 = Atk<br><br />
1 = Mag<br><br />
2 = HP<br><br />
3 = Lost HP<br><br />
4 = Random (0 to 999)<br><br />
5 = 100<br><br />
6 = HP<br><br />
7 = MP<br><br />
8 = Atk<br><br />
9 = Aim<br><br />
10 = Def<br><br />
11 = Dog<br><br />
12 = Mag<br><br />
13 = Wil<br><br />
14 = Spd<br><br />
15 = Ctr<br><br />
16 = Focus<br><br />
17 = extra Hits<br><br />
18 = Previous attack<br><br />
19 = Last damage to attacker<br><br />
20 = Last damage to target<br><br />
21 = Last cure to attacker {{WIP|inline}}<br><br />
22 = Last cure to target {{WIP|inline}}<br><br />
|-<br />
|8||INT (1)||MP Cost<br />
|-<br />
|9||INT (1)||HP Cost<br />
|-<br />
|10||INT (1)||Money Cost<br />
|-<br />
|11||INT (1)||Extra Damage %<br />
|-<br />
|12||INT (1)||Chain-to attack number + 1, 0 for none<br />
|-<br />
|13||INT (1)||Chain Rate % (0-100)<br />
|-<br />
|14||INT (1)||Attacker Animation:<br />
0 = Strike<br>1 = Cast<br>2 = Dash In<br>3 = SpinStrike<br>4 = Jump<br>5 = Land<br>6 = Null<br>7 = Standing Cast<br>8 = Teleport<br />
|-<br />
|15||INT (1)||Attack Animation:<br />
0 = Normal<br>1 = Projectile<br>2 = Reverse projectile<br>3 = Drop<br>4 = Ring<br>5 = Wave<br>6 = Scatter<br>7 = Sequential Projectile<br>8 = Meteor<br>9 = Driveby<br>10 = Null<br />
|-<br />
|16||INT (1)||Attack Delay (ticks)<br />
|-<br />
|17||INT (1)||Number of hits (range 1 to 20)<br />
|-<br />
|18||INT (1)||Target Stat:<br />
0 = HP<br>1 = MP<br>2 = Atk<br>3 = Aim<br>4 = Def<br>5 = Dog<br>6 = Mag<br>7 = Wil<br>8 = Spd<br>9 = Ctr<br>10 = Focus<br>11 = extra Hits<br>12 = Poison register<br>13 = Regen register<br>14 = Stun register<br>15 = Mute register<br />
|-<br />
|19||INT (1)||Preferred target:<br>0 = default<br>1 = first<br>2 = closest<br>3 = farthest<br>4 = random<br>5 = weakest<br>6 = strongest<br>7 = weakest%<br>8 = strongest%<br />
|-<br />
|rowspan="26" valign="top"|20 - 23:<br>Attack Bitsets 1 (64)||BIT (1)||0: Cure Instead of Harm<br />
|-<br />
|BIT (1)||1: Divide Spread Damage<br />
|-<br />
|BIT (1)||2: Absorb Damage<br />
|-<br />
|BIT (1)||3: Unreversable Picture<br />
|-<br />
|BIT (1)||4: Steal Item<br />
|-<br />
|BIT (8)||5 - 12: Elementary 1 - 8 Damage<br />
|-<br />
|BIT (8)||13 - 20: Bonus vs. Monster Type 1 - 8<br />
|-<br />
|BIT (8)||21 - 28: Fail vs. Elementary 1 - 8 Resistance<br />
|-<br />
|BIT (8)||29 - 36: Fail vs. Monster Type 1 - 8<br />
|-<br />
|BIT (8)||37: Cannot target enemy slot 0 - 7<br />
|-<br />
|BIT (4)||45: Cannot target hero slot 0 - 3<br />
|-<br />
|BIT (1)||49: Ignore attacker's extra hits<br />
|-<br />
|BIT (1)||50: Erase rewards (enemy target only)<br />
|-<br />
|BIT (1)||51: Show damage without inflicting<br />
|-<br />
|BIT (1)||52: Store Target<br />
|-<br />
|BIT (1)||53: Delete Stored Target<br />
|-<br />
|BIT (1)||54: Automaticaly choose target<br />
|-<br />
|BIT (1)||55: Show attack name<br />
|-<br />
|BIT (1)||56: Do not display Damage<br />
|-<br />
|BIT (1)||57: Reset target stat to max before hit<br />
|-<br />
|BIT (1)||58: Allow Cure to exceed maximum<br />
|-<br />
|BIT (1)||59: Useable Outside of Battle<br />
|-<br />
|BIT (1)||60: Damage MP (obsolete, but still supported)<br />
|-<br />
|BIT (1)||61: Do not randomize<br />
|-<br />
|BIT (1)||62: Damage can be Zero<br />
|-<br />
|BIT (1)||63: Cause heroes to run away<br />
|-<br />
|24 - 35||FVSTR (1i+1i+10i=12i)||Attack Name, 10 characters max:<br>First INT contains length, the second is unused<br />
|-<br />
|36||INT (1)||Caption Display Time:<br />
-1 = Do not display<br>0 = Full duration of attack<br>>=1 = Number of ticks to display<br />
|-<br />
|37 - 56||FVSTR (1i+38b=40b)||Attack Caption, 38 characters max (note that the length INT ant first 4 chars are stored in DT6 and the remainder of the caption is stored in ATTACK.BIN)<br />
|-<br />
|57||INT (1)||Caption Delay (range 0 to 16383)<br />
|-<br />
|58||INT (1)||Base Defense Stat:<br />
0 = Default (Wil if base attack stat is Mag, Def otherwise)<br>1 = HP<br>2 = MP<br>3 = Atk<br>4 = Aim<br>5 = Def<br>6 = Dog<br>7 = Mag<br>8 = Wil<br>9 = Spd<br>10 = Ctr<br>11 = Focus<br>12 = extra Hits<br />
|-<br />
|59||INT (1)||Tag to Set<br><br />
0 - none<br><br />
> 0 - set tag<br><br />
< 0 - unset tag<br />
|-<br />
|60||INT (1)||Tag Condition<br><br />
0 - Never<br><br />
1 - Always<br><br />
2 - Hit<br><br />
3 - Miss<br><br />
4 - Kill<br />
|-<br />
|61||INT (1)||Tag Check<br><br />
0 - none<br><br />
> 0 - tag must be on<br><br />
< 0 - tag must be off<br />
|-<br />
|62||INT (1)||Tag to Set #2<br><br />
0 - none<br><br />
> 0 - set tag<br><br />
< 0 - unset tag<br />
|-<br />
|63||INT (1)||Tag Condition #2<br><br />
0 - Never<br><br />
1 - Always<br><br />
2 - Hit<br><br />
3 - Miss<br><br />
4 - Kill<br />
|-<br />
|64||INT (1)||Tag Check #2<br><br />
0 - none<br><br />
> 0 - tag must be on<br><br />
< 0 - tag must be off<br><br />
|-<br />
|rowspan="20" valign="top"|65 - 72:<br>Bitsets 2 (128)||BIT (1)||0: Mutable<br />
|-<br />
|BIT (1)||1: Fail if target is Poisoned<br />
|-<br />
|BIT (1)||2: Fail if target is Regened<br />
|-<br />
|BIT (1)||3: Fail if target is Stunned<br />
|-<br />
|BIT (1)||4: Fail if target is Muted<br />
|-<br />
|BIT (1)||5: % based attacks damage instead of set<br />
|-<br />
|BIT (1)||6: Check costs when used as a weapon<br />
|-<br />
|BIT (1)||7: Do not chain if attack fails<br />
|-<br />
|BIT (1)||8: Reset Poisoned register<br />
|-<br />
|BIT (1)||9: Reset Regened register<br />
|-<br />
|BIT (1)||10: Reset Stun Register<br />
|-<br />
|BIT (1)||11: Reset Mute Register<br />
|-<br />
|BIT (1)||12: Cancel target's attack<br />
|-<br />
|BIT (1)||13: Can't be canceled by other attacks<br />
|-<br />
|BIT (1)||14: Do not trigger spawning on attack<br />
|-<br />
|BIT (1)||15: Do not trigger spawning on death<br />
|-<br />
|BIT (1)||16: Check costs when used as an item in battle<br />
|-<br />
|BIT (1)||17: Re-check costs after attack delay<br />
|-<br />
|BIT (1)||18: Does not cause target to flinch {{WIP|inline}}<br />
|-<br />
|bgcolor="#D0D0D0"|BIT (109)||19-127: Unused<br />
|-<br />
|73 - 92||VSTR (1i+38b = 40b)||Spell description<br />
|-<br />
|93, 95, 97||INT (1) x 3||Item ID+1 to be consumed (or given) or 0 for none (x3)<br />
|-<br />
|94, 96, 98||INT (1) x 3||Number of items to be consumed (or given) (x3)<br />
|-<br />
|99||INT (1)||Sound effect to be played + 1 (0 for none)<br />
|-<br />
|100||INT (1)||Stat for preferred target weakest/strongest<br>0 = same as target stat<br>1 = HP<br>2 = MP<br>3 = Atk<br>4 = Aim<br>5 = Def<br>6 = Dog<br>7 = Mag<br>8 = Wil<br>9 = Spd<br>10 = Ctr<br>11 = Focus<br>12 = extra Hits<br>13 = Poison register<br>14 = Regen register<br>15 = Stun register<br>16 = Mute register<br />
|-<br />
|bgcolor="#FFC8C8"|101||INT(1)||Chain condition type<br><br />
0: No special conditions<br><br />
1: both val1 and val2 are tags to check<br><br />
2: attacker stat val1 greater than val2<br><br />
3: attacker stat val1 less than than val2<br><br />
4: attacker stat val1 greater than val2%<br><br />
5: attacker stat val1 less than than val2%<br><br />
|-<br />
|bgcolor="#FFC8C8"|102||INT(1)||Chain condition Primary value (meaning varies depending on Chain type)<br />
|-<br />
|bgcolor="#FFC8C8"|103||INT(1)||Chain condition secondary value (meaning varies depending on Chain type)<br />
|-<br />
|bgcolor="#FFC8C8" valign="top"|104|| || Chain bits<br><br />
0: Attacker must know the chained attack also<br><br />
1: Chained attack ignores delay<br><br />
|-<br />
|bgcolor="#FFC8C8"|105||INT (1)||Else-Chain-to attack number + 1, 0 for none<br />
|-<br />
|bgcolor="#FFC8C8"|106||INT(1)||Else-Chain condition type (see chain condition type for valid values)<br />
|-<br />
|bgcolor="#FFC8C8"|107||INT (1)||Else-Chain Rate % (0-100)<br />
|-<br />
|bgcolor="#FFC8C8"|108||INT (1)||Else-Chain condition value (meaning varies depending on Else-Chain type)<br />
|-<br />
|bgcolor="#FFC8C8"|109||INT(1)||Else-Chain condition secondary value (meaning varies depending on Else-Chain type)<br />
|-<br />
|bgcolor="#FFC8C8"|110||BIT(16)||Else-chain bits (see chain bits)<br />
|-<br />
|bgcolor="#FFC8C8"|111||INT (1)||Instead-Chain-to attack number + 1, 0 for none<br />
|-<br />
|bgcolor="#FFC8C8"|112||INT(1)||Instead-Chain condition type (see chain condition type for valid values)<br />
|-<br />
|bgcolor="#FFC8C8"|113||INT (1)||Instead-Chain Rate % (0-100)<br />
|-<br />
|bgcolor="#FFC8C8"|114||INT (1)||Instead-Chain condition value (meaning varies depending on Instead-Chain type)<br />
|-<br />
|bgcolor="#FFC8C8"|115||INT(1)||Instead-Chain condition secondary value (meaning varies depending on Instead-Chain type)<br />
|-<br />
|bgcolor="#FFC8C8"|116||BIT(16)||Instead-chain bits (see chain bits)<br />
|-<br />
|bgcolor="#FFC8C8"|117||INT (1)||Sound effect when learned from item or levelup + 1 (0 for none)<br />
|}<br />
<br />
{{LumpSpec}}<br />
* [[ATTACK.BIN]]<br />
* [[BINSIZE.BIN]]</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:What_is_a_string_and_how_do_I_use_it%3F&diff=24573Talk:What is a string and how do I use it?2009-10-05T18:41:34Z<p>Msw188: </p>
<hr />
<div>If people approve of my answer to 'what is a script argument', I will try to write up a similarly formatted page for this question. Of course, and suggestions on improvement are welcome (I guess this ought to go in the other talk page.--[[User:Msw188|Msw188]] 03:59, 25 September 2009 (UTC)<br />
<br />
Go for it. --[[User:Bob the Hamster|Bob the Hamster]] 01:14, 27 September 2009 (UTC)<br />
<br />
In response to TMC's concerns about such an article and the differences between 'strings' and 'plotstrings' and 'text slices' and 'Wonder Bread' and everything else: I'm just gonna approach the article from a non-programmer standpoint as best I can. It seems to me to be the best way to respond to someone asking what a string is. A programmer-based answer would better be put on a page about the source and/or development plans, or maybe in answer to an FAQ more like "How are strings implemented in Hamsterspeak, and whose idea was it to do it like this anyhow?"<br />
<br />
I hope to have a roughdraft of this article by tonight or tomorrow, but I'm not on a deadline or anything, haha--[[User:Msw188|Msw188]] 18:40, 5 October 2009 (UTC)<br />
<br />
Forgot to ask - is there still only 32 string IDs available in plotscripting? Is that limit meaningful at all, or will it probably disappear soon?--[[User:Msw188|Msw188]] 18:41, 5 October 2009 (UTC)</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:What_is_a_string_and_how_do_I_use_it%3F&diff=24572Talk:What is a string and how do I use it?2009-10-05T18:40:06Z<p>Msw188: </p>
<hr />
<div>If people approve of my answer to 'what is a script argument', I will try to write up a similarly formatted page for this question. Of course, and suggestions on improvement are welcome (I guess this ought to go in the other talk page.--[[User:Msw188|Msw188]] 03:59, 25 September 2009 (UTC)<br />
<br />
Go for it. --[[User:Bob the Hamster|Bob the Hamster]] 01:14, 27 September 2009 (UTC)<br />
<br />
In response to TMC's concerns about such an article and the differences between 'strings' and 'plotstrings' and 'text slices' and 'Wonder Bread' and everything else: I'm just gonna approach the article from a non-programmer standpoint as best I can. It seems to me to be the best way to respond to someone asking what a string is. A programmer-based answer would better be put on a page about the source and/or development plans, or maybe in answer to an FAQ more like "How are strings implemented in Hamsterspeak, and whose idea was it to do it like this anyhow?"<br />
<br />
I hope to have a roughdraft of this article by tonight or tomorrow, but I'm not on a deadline or anything, haha--[[User:Msw188|Msw188]] 18:40, 5 October 2009 (UTC)</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:What_is_a_script_argument_for%3F&diff=24571Talk:What is a script argument for?2009-10-05T18:34:02Z<p>Msw188: </p>
<hr />
<div>If people have suggestions on how to improve this, or just plain out think that this is not the way to write such an article, let me know. If people like it, let's decide how best to format it for the actual page and then I will try to do one in a similar style for the "What is a string?" question.--[[User:Msw188|Msw188]] 04:01, 25 September 2009 (UTC)<br />
<br />
I think it is good. You should go ahead and replace the main body of the article with what you wrote here. Any improvements anyone thinks of can follow. --[[User:Bob the Hamster|Bob the Hamster]] 01:12, 27 September 2009 (UTC)<br />
<br />
It's miles better than the current article. I'm glad you wrote this; I dread having to write such things. A suggestion: I think it would be a good idea to mention that arguments actually are variables too.<br />
<br />
Although I was initially concerned with all this talk of 'names' and 'numbers', I think it it actually wouldn't give anyone the wrong ideas when typing is finally added -- on the other hand, strings are trickier. There are so many problems: 1) to a programmer, our implementation of strings will probably not make sense, so they might be want to read an article as well. 2) Plotstrings are both strings and floating text, which is very unfortunate. In both capacities, they will become obsolete (though they'll stay around) and are already been partially superseded by text slices (which do not yet support count downs, however) -- but those are unreleased :/. Real strings will be completely different to plotstrings, so try not to give anyone any wrong ideas about what a string is. Prehaps you should split the article in 3: what a string is, how plotstrings hold strings, and visible plotstrings. Also, I do not know whether the string shortcut operators $+ and $= will stay around.<br />
<br />
Formatting is simple. Replace bold with headings. [[User:The Mad Cacti|The Mad Cacti]] 09:19, 29 September 2009 (UTC)<br />
<br />
Okay, I replaced the main page. I'm not sure what you mean "Replace bold with headings", but I left a 'revise' tag on the page to remind us about doing it. Sorry this took so long - I had no computer access for a few days while we were on a trip to Maine. I'm going to talk about a string article on that talk page.--[[User:Msw188|Msw188]] 18:34, 5 October 2009 (UTC)</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=What_is_a_script_argument_for%3F&diff=24570What is a script argument for?2009-10-05T18:29:23Z<p>Msw188: New page</p>
<hr />
<div>{{revise|I don't know how best to format this to match other articles, and ideally a lot of things in here ought to be linked to their wiki entries, but I'm not sure how to do that either}}<br />
'''DEFINITION/WHAT IT DOES'''<br />
<br />
An argument is a piece of information that a script or command uses. In the vast majority of simple cases it is either a number, or a special word that stands for a number.<br />
<br />
Before thinking about arguments for your scripts, it may be easier to see them used in basic commands. Simply put, there are some commands in Hamsterspeak that know what to do without any extra information. One example would be "Wait for text box". This command does not need any arguments, because it always does the same thing. On the other hand, the command "Show text box" is rather useless on its own. It needs to know ''which'' text box to show, and the number of the text box you want to show is called the ''argument''. We put arguments in parentheses like so:<br />
<br />
<pre>show text box (13)</pre><br />
<br />
Here 13 is the argument for the command "show text box". Programmers say that they have "passed the argument ''13'' to the command ''show text box''" in such scenarios.<br />
<br />
'''HOW TO USE THEM IN YOUR OWN SCRIPTS'''<br />
<br />
First of all, it should be noted that the majority of scripts that authors write will not need arguments of their own. They may use plenty of commands that need arguments, but the scripts themselves probably won't need any. What kind of scripts could an author write that would need their own arguments?<br />
<br />
Scripts only need arguments if they are going to occur in a variety of situations. "Show text box" needs an argument because it is used in a variety of situations, each time doing something slightly different. Imagine for a moment that we want to write our own script that makes an NPC pace, that is, it makes an NPC walk one step to the left, stop for a moment, and then walk one step to the right (for simplicity's sake, we will leave this NPC facing right after he's done pacing). The reason this script needs an argument is that the script itself has no way of knowing ''which'' NPC is pacing, and if we want this same script to be used over and over in our game to make different NPCs pace, we need to make it use an argument. Here is how:<br />
<br />
First, when we name our script, we have to give a name to our argument right away. I'm going to name the script "Pace NPC", and I'm going to name the argument "arg_Who", so my first line should look like:<br />
<br />
<pre>plotscript, Pace NPC, arg_Who, begin</pre><br />
<br />
After the word plotscript comes the name of the script, then a comma, then the names of any arguments we're going to use separated by commas, then we use the word "begin" to signal the end of the list of arguments and the beginning of the actual script (This means you cannot name your argument "begin"!).<br />
<br />
In the script itself, we can use our argument names as if they are variables. So for this example I type:<br />
<br />
<pre>walk npc (arg_Who, west, 1)<br />
wait for npc (arg_Who)<br />
wait (12) #this is so the NPC pauses before pacing back in the other direction<br />
walk npc (arg_Who, east, 1)<br />
wait for npc (arg_Who)<br />
end</pre><br />
<br />
In the script above, the word "arg_Who" gets replaced by the argument that is passed to this script whenever it is used. Now to use this script, I can call it by name in any other script like so:<br />
<br />
<pre>plotscript, My Other Script, begin<br />
#I'm gonna use this script to make NPCs 4, 5, and 12 all pace one after another.<br />
suspend npcs #This is to make sure the NPCs don't move on their own while I'm trying to make them pace<br />
Pace NPC (4) #The 4 is the argument that will take the place of "arg_Who" in the Pace NPC script!<br />
Pace NPC (5)<br />
Pace NPC (12)<br />
resume npcs<br />
end</pre><br />
<br />
'''ADVANCED STUFF'''<br />
<br />
*More than one argument - Just as the command "Walk NPC" needs three arguments (which NPC to walk, what direction, and how many steps), it is entirely possible to create scripts with as many arguments as desired to allow whatever flexibility is needed.<br />
*Arguments automatically passed by custom - There are lots of different ways that a script can be triggered in a game. Some of these triggering mechanisms automatically pass certain special arguments to whatever script they triggered. For example, when an NPC is set to trigger a plotscript, it passes two arguments to the script automatically - first is a number telling the script which NPC triggered the script (an NPC reference, not the NPC ID number), and secondly it sends whatever number it's told to in custom in the Edit NPCs submenu of the Map Editor.<br />
*Formulae, variables, and even scripts can be put into argument slots - Just as we can type "show text box (5+4)" to get a script to show text box number 9, we can pass all sorts of complicated junk as arguments in the parentheses of both commands and scripts as long as whatever it is that we put there boils down to a number in the end. Mathematical operations are easy to see and understand in this regard, but things can be more complicated.<br />
<br />
=See Also=<br />
* [[wikipedia:Parameter (computer science)|Wikipedia article on Arguments and Parameters]]<br />
<br />
[[Category:FAQ]]<br />
[[Category:Plotscripting]]</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:Plan_for_improved_attack_chaining&diff=24549Talk:Plan for improved attack chaining2009-09-25T04:03:52Z<p>Msw188: Agree with NeoTA</p>
<hr />
<div>Wow, some of these things sound ridiculously awesome. Especially the bitsets that make attacks chain differently--someone could make a Megaman-ish "many weapons, but you need to take a turn to switch between them" character that way. Or a FF5-like "infuse spells into your weapon" ability. Or a "switch fighting styles" type of thing that sets your default attack to blunt/sharp/normal. I'm guessing I might go back into Okédoké and add some new attacks after this feature is added (or maybe the next game I make after Okédoké could use them...) [[User:FnrrfYgmSchnish|FnrrfYgmSchnish]] 15:59, 13 September 2009 (UTC)<br />
<br />
[[User:NeoTA|NeoTA]]: I found the 'instead chain' concept slightly confusing.<br />
I'm guessing that 'If an instead chaining is specified, and its condition is true at the time the<br />
attack is performed, the battle engine will chain to the specified instead attack. Otherwise, the default chaining is evaluated, and if true, executed; if false, the else chaining is processed similarly'. I think this is not obvious so it should be mentioned in the relevant help file.<br />
<br />
[[User:NeoTA|NeoTA]]: I realize now that the way it works is actually implicitly described in the plan. Still, the above should be a decent explicit explanation.<br />
<br />
[[User:Bob the Hamster|Bob the Hamster]]: I will explain it in detail in the F1 help. I was also wondering if I should rename it to "Replace-Chain". Do you think that would be less confusing?<br />
<br />
[[User:NeoTA|NeoTA]]: that would be an improvement -- I am now suspecting though that it's the default chaining having no adjective that caused my confusion.. that is, IMO 'default chain' 'instead chain' 'else chain' is a far less ambiguous set.<br />
<br />
[[User:Msw188|Msw188]]: I think I agree with NeoTA that the real key to clearing this up is calling the initial chain something like the 'default'.--[[User:Msw188|Msw188]] 04:03, 25 September 2009 (UTC)</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:What_is_a_script_argument_for%3F&diff=24548Talk:What is a script argument for?2009-09-25T04:01:39Z<p>Msw188: If we like it, I'll try another. If not, just let me know</p>
<hr />
<div>[[User:Msw188|Msw188]]:Here is a beginning to an article on this, similar to what I wrote for PepsiRanger back in the day I believe.<br />
<br />
'''DEFINITION/WHAT IT DOES'''<br />
<br />
An argument is a piece of information that a script or command uses. In the vast majority of simple cases it is either a number, or a special word that stands for a number.<br />
<br />
Before thinking about arguments for your scripts, it may be easier to see them used in basic commands. Simply put, there are some commands in Hamsterspeak that know what to do without any extra information. One example would be "Wait for text box". This command does not need any arguments, because it always does the same thing. On the other hand, the command "Show text box" is rather useless on its own. It needs to know ''which'' text box to show, and the number of the text box you want to show is called the ''argument''. We put arguments in parentheses like so:<br />
<br />
<pre>show text box (13)</pre><br />
<br />
Here 13 is the argument for the command "show text box". Programmers say that they have "passed the argument ''13'' to the command ''show text box''" in such scenarios.<br />
<br />
'''HOW TO USE THEM IN YOUR OWN SCRIPTS'''<br />
<br />
First of all, it should be noted that the majority of scripts that authors write will not need arguments of their own. They may use plenty of commands that need arguments, but the scripts themselves probably won't need any. What kind of scripts could an author write that would need their own arguments?<br />
<br />
Scripts only need arguments if they are going to occur in a variety of situations. "Show text box" needs an argument because it is used in a variety of situations, each time doing something slightly different. Imagine for a moment that we want to write our own script that makes an NPC pace, that is, it makes an NPC walk one step to the left, stop for a moment, and then walk one step to the right (for simplicity's sake, we will leave this NPC facing right after he's done pacing). The reason this script needs an argument is that the script itself has no way of knowing ''which'' NPC is pacing, and if we want this same script to be used over and over in our game to make different NPCs pace, we need to make it use an argument. Here is how:<br />
<br />
First, when we name our script, we have to give a name to our argument right away. I'm going to name the script "Pace NPC", and I'm going to name the argument "arg_Who", so my first line should look like:<br />
<br />
<pre>plotscript, Pace NPC, arg_Who, begin</pre><br />
<br />
After the word plotscript comes the name of the script, then a comma, then the names of any arguments we're going to use separated by commas, then we use the word "begin" to signal the end of the list of arguments and the beginning of the actual script (This means you cannot name your argument "begin"!).<br />
<br />
In the script itself, we can use our argument names as if they are variables. So for this example I type:<br />
<br />
<pre>walk npc (arg_Who, west, 1)<br />
wait for npc (arg_Who)<br />
wait (12) #this is so the NPC pauses before pacing back in the other direction<br />
walk npc (arg_Who, east, 1)<br />
wait for npc (arg_Who)<br />
end</pre><br />
<br />
In the script above, the word "arg_Who" gets replaced by the argument that is passed to this script whenever it is used. Now to use this script, I can call it by name in any other script like so:<br />
<br />
<pre>plotscript, My Other Script, begin<br />
#I'm gonna use this script to make NPCs 4, 5, and 12 all pace one after another.<br />
suspend npcs #This is to make sure the NPCs don't move on their own while I'm trying to make them pace<br />
Pace NPC (4) #The 4 is the argument that will take the place of "arg_Who" in the Pace NPC script!<br />
Pace NPC (5)<br />
Pace NPC (12)<br />
resume npcs<br />
end</pre><br />
<br />
'''ADVANCED STUFF'''<br />
<br />
*More than one argument - Just as the command "Walk NPC" needs three arguments (which NPC to walk, what direction, and how many steps), it is entirely possible to create scripts with as many arguments as desired to allow whatever flexibility is needed.<br />
*Arguments automatically passed by custom - There are lots of different ways that a script can be triggered in a game. Some of these triggering mechanisms automatically pass certain special arguments to whatever script they triggered. For example, when an NPC is set to trigger a plotscript.<br />
*Formulae, variables, and even scripts can be put into argument slots - Just as we can type "show text box (5+4)" to get a script to show text box number 9, we can pass all sorts of complicated junk as arguments in the parentheses of both commands and scripts as long as whatever it is that we put there boils down to a number in the end. Mathematical operations are easy to see and understand in this regard, but things can be more complicated.<br />
<br />
If people have suggestions on how to improve this, or just plain out think that this is not the way to write such an article, let me know. If people like it, let's decide how best to format it for the actual page and then I will try to do one in a similar style for the "What is a string?" question.--[[User:Msw188|Msw188]] 04:01, 25 September 2009 (UTC)</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:What_is_a_string_and_how_do_I_use_it%3F&diff=24547Talk:What is a string and how do I use it?2009-09-25T03:59:07Z<p>Msw188: Offerring to do this similarly to my argument description</p>
<hr />
<div>If people approve of my answer to 'what is a script argument', I will try to write up a similarly formatted page for this question. Of course, and suggestions on improvement are welcome (I guess this ought to go in the other talk page.--[[User:Msw188|Msw188]] 03:59, 25 September 2009 (UTC)</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:What_is_a_script_argument_for%3F&diff=24542Talk:What is a script argument for?2009-09-24T03:50:11Z<p>Msw188: A roughdraft for this page - what do you guys think?</p>
<hr />
<div>[[User:Msw188|Msw188]]:Here is a beginning to an article on this, similar to what I wrote for PepsiRanger back in the day I believe.<br />
<br />
'''DEFINITION/WHAT IT DOES'''<br />
<br />
An argument is a piece of information that a script or command uses. In the vast majority of simple cases it is either a number, or a special word that stands for a number.<br />
<br />
Before thinking about arguments for your scripts, it may be easier to see them used in basic commands. Simply put, there are some commands in Hamsterspeak that know what to do without any extra information. One example would be "Wait for text box". This command does not need any arguments, because it always does the same thing. On the other hand, the command "Show text box" is rather useless on its own. It needs to know ''which'' text box to show, and the number of the text box you want to show is called the ''argument''. We put arguments in parentheses like so:<br />
<br />
<pre>show text box (13)</pre><br />
<br />
Here 13 is the argument for the command "show text box". Programmers say that they have "passed the argument ''13'' to the command ''show text box''" in such scenarios.<br />
<br />
'''HOW TO USE THEM IN YOUR OWN SCRIPTS'''<br />
<br />
First of all, it should be noted that the majority of scripts that authors write will not need arguments of their own. They may use plenty of commands that need arguments, but the scripts themselves probably won't need any. What kind of scripts could an author write that would need their own arguments?<br />
<br />
Scripts only need arguments if they are going to occur in a variety of situations. "Show text box" needs an argument because it is used in a variety of situations, each time doing something slightly different. Imagine for a moment that we want to write our own script that makes an NPC pace, that is, it makes an NPC walk one step to the left, stop for a moment, and then walk one step to the right (for simplicity's sake, we will leave this NPC facing right after he's done pacing). The reason this script needs an argument is that the script itself has no way of knowing ''which'' NPC is pacing, and if we want this same script to be used over and over in our game to make different NPCs pace, we need to make it use an argument. Here is how:<br />
<br />
First, when we name our script, we have to give a name to our argument right away. I'm going to name the script "Pace NPC", and I'm going to name the argument "arg_Who", so my first line should look like:<br />
<br />
<pre>plotscript, Pace NPC, arg_Who, begin</pre><br />
<br />
After the word plotscript comes the name of the script, then a comma, then the names of any arguments we're going to use separated by commas, then we use the word "begin" to signal the end of the list of arguments and the beginning of the actual script (This means you cannot name your argument "begin"!).<br />
<br />
In the script itself, we can use our argument names as if they are variables. So for this example I type:<br />
<br />
<pre>walk npc (arg_Who, west, 1)<br />
wait for npc (arg_Who)<br />
wait (12) #this is so the NPC pauses before pacing back in the other direction<br />
walk npc (arg_Who, east, 1)<br />
wait for npc (arg_Who)<br />
end</pre><br />
<br />
In the script above, the word "arg_Who" gets replaced by the argument that is passed to this script whenever it is used. Now to use this script, I can call it by name in any other script like so:<br />
<br />
<pre>plotscript, My Other Script, begin<br />
#I'm gonna use this script to make NPCs 4, 5, and 12 all pace one after another.<br />
suspend npcs #This is to make sure the NPCs don't move on their own while I'm trying to make them pace<br />
Pace NPC (4) #The 4 is the argument that will take the place of "arg_Who" in the Pace NPC script!<br />
Pace NPC (5)<br />
Pace NPC (12)<br />
resume npcs<br />
end</pre><br />
<br />
'''ADVANCED STUFF'''<br />
<br />
*More than one argument - Just as the command "Walk NPC" needs three arguments (which NPC to walk, what direction, and how many steps), it is entirely possible to create scripts with as many arguments as desired to allow whatever flexibility is needed.<br />
*Arguments automatically passed by custom - There are lots of different ways that a script can be triggered in a game. Some of these triggering mechanisms automatically pass certain special arguments to whatever script they triggered. For example, when an NPC is set to trigger a plotscript.<br />
*Formulae, variables, and even scripts can be put into argument slots - Just as we can type "show text box (5+4)" to get a script to show text box number 9, we can pass all sorts of complicated junk as arguments in the parentheses of both commands and scripts as long as whatever it is that we put there boils down to a number in the end. Mathematical operations are easy to see and understand in this regard, but things can be more complicated.</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:F.A.Q.&diff=24541Talk:F.A.Q.2009-09-24T03:00:06Z<p>Msw188: two more to strike, perhaps?</p>
<hr />
<div>[[Talk:FAQ/old archived talk]]<br />
<br />
== fresh start ==<br />
<br />
So I just nuked the FAQ from orbit. The old FAQ still lives on at [[Gigantor List Of Questions]], which I hope will still provide a useful resource to the question-hungry. If any of the devs or experienced users wish to further trim the FAQ, go right ahead. I welcome it. Also, feel free to add questions too, but only if they ''really are'' frequently asked. -- [[User:Bob the Hamster|Bob the Hamster]] 22:38, 22 September 2009 (UTC)<br />
<br />
Oh wow. Yesterday before I went to bed, I saw that new FAQ question and thought to myself: "I must remember to suggest to James tomorrow that we <do exactly what you just did>". Wonderful! -- [[User:The Mad Cacti|The Mad Cacti]] 20:50, 23 September 2009 (UTC)<br />
<br />
[[User:Msw188|Msw188]]:I think this is wonderful. I have two more suggested removals:<br />
<br />
How do I make a drain or leech spell that steals HP? (General Questions)<br />
Is this really asked very often? The bitset for this seems pretty obvious to me.<br />
<br />
How do I make an NPC disappear after ending its plotscript by making it walk out of view? (Plotscripting Questions)<br />
This seems to be a strangely specific question, I'd be surprised if it was 'frequent'.<br />
.</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:Plan_for_stat_buffs&diff=17874Talk:Plan for stat buffs2008-09-16T00:56:42Z<p>Msw188: </p>
<hr />
<div>[[User: Myroc|Myroc]]: This is probably a stupid question but will this include special abilties for buffs (such as berserk), and not just stat changes?<br />
<br />
<br />
[[User:Bob the Hamster|Bob the Hamster]]: I would like to eventually support berserk, but I don't know if the buff system would be the best way to implement it or not. I do think buffs should work with affliction registers like poison and stun.<br />
<br />
[[User: Myroc|Myroc]]: Ah, i thought that "buffs" would replace the current status effects. Still, would be fun to see stat changes<br />
<br />
--[[User:Msw188|Msw188]] 00:56, 16 September 2008 (UTC)I posted a fairly long suggestion about this at Castle Paradox:<br />
[http://www.castleparadox.com/ohr/viewtopic.php?t=5946 Yum!]</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:Plan_for_more_flexible_elementals&diff=17860Talk:Plan for more flexible elementals2008-09-13T13:39:30Z<p>Msw188: </p>
<hr />
<div>james you are my hero --[[User:Moogle1|Moogle1]] 19:43, 31 July 2008 (UTC)<br />
<br />
--[[User:MasterofKittens|Newbie McButts]] 22:22, 31 July 2008 (UTC) Will the attack bitsets "Fail vs. Enemy Type" still remain intact in functionability for the new elemental system? I've actually been using Enemy Types to make them immune to status effects. EDIT: Nevermind. Just re-read the plan which suggests that you can.<br />
<br />
'''Mystic:''' Yes absolutely. My current project has an element heavy system and this would be very helpful.<br />
<br />
This is all really awesome. The one thing I would really love to add is the ability to alter elemental bitsets in battle. Equipment too, but that's another beast I'm guessing.</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:Is_it_possible_to_make_an_enemy_know_whether_it_is_poisoned_or_stunned_so_it_can_heal_itself%3F&diff=17674Talk:Is it possible to make an enemy know whether it is poisoned or stunned so it can heal itself?2008-08-03T07:22:21Z<p>Msw188: New page: ~~~:If you have an element to spare, this can be done with spawning. Should this be mentioned on the main page? My idea would be: -Smart enemies are set to spawn an antidoting enemy upo...</p>
<hr />
<div>[[User:Msw188|Msw188]]:If you have an element to spare, this can be done with spawning. Should this be mentioned on the main page? My idea would be:<br />
<br />
-Smart enemies are set to spawn an antidoting enemy upon being hit with a poison elemental attack.<br />
<br />
-The antidoting enemy has only one attack, with a wait time designed to be how long the enemy waits before it 'heals itself'.<br />
<br />
-The attack is a chain that cures the spawner's poison (done with prefer weakest stat, perhaps) and destroys the antidoter.<br />
<br />
-The chain may also need to include a 'freezing' sequence, setting the spawner's speed to zero for a bit so that the spawner does not seem to get two turns very quickly.<br />
<br />
First off, does this seem possible? Second off, is this too long and complicated for the wiki-answer to such a question?</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:How_do_I_create_an_attack_that_allows_the_player_to_choose_the_first_target_but_then_it%27s_chained_to_an_attack_that_can_randomly_choose_another_target%3F&diff=17517Talk:How do I create an attack that allows the player to choose the first target but then it's chained to an attack that can randomly choose another target?2008-07-12T16:54:47Z<p>Msw188: New page: This is exactly what I'm talking about (see bug 380 on bugzilla). I always assumed that chained attacks did NOT remember the previous target unless specifically told to do so, but then Mo...</p>
<hr />
<div>This is exactly what I'm talking about (see bug 380 on bugzilla). I always assumed that chained attacks did NOT remember the previous target unless specifically told to do so, but then Moogle1 said that the "previous target" option was not always available, so chains were made to be this way back in the day. Most unfortunate. The best I could offer right now is to try the targetting option "random focus" instead of focus, or to try having the middle 'nothing' attack target the opposite team as the real parts of the chain.<br />
<br />
I really think this needs to be changed. Maybe have games that were made before a certain date work this way, but have new games follow the targetting options exactly as they are? But if there are people working on games now who count on this behavior, then we may be in trouble.</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:Why_did_you_pick_such_strange_names_for_each_version_of_CUSTOM_and_GAME.EXE%3F&diff=17078Talk:Why did you pick such strange names for each version of CUSTOM and GAME.EXE?2008-01-25T21:48:09Z<p>Msw188: </p>
<hr />
<div>[[User:James Paige|James Paige]]: I really do have an obsession waffles. Have you ever played a word-association game? Somebody says a word, and you are suppose to say the first word that comes into your head. It is supposed to expose the subconcious connections you make between various things... except when I play that game, I always think the word "waffles" no matter what anybody says to me. Sometimes If I really clear my mind and focus, I can manage some other word that starts with a "w" like "what" "where" "why" "who" "weevil" or "warbling", but invariably I fall back to "waffle" the moment I relax.<br />
<br />
<br />
[[User:Bob the Hamster|Bob the Hamster]]: Zeitgeist, huh? I was hoping for '''zipperumpazoo''' but James says it is too long to fit on the screen.<br />
<br />
[[User:Msw188|Msw188]]: Ha, I never saw this page before. I remember when Quaternion was released, I kind of wondered if it was a reference to actual quaternions, but I figured 'no way' and decided that there must be some other use of the word that I wasn't aware of. And I never knew what Rusalka was, or Paternoster. Anyway, how come there's no 'Y', but there is a 'Z'?<br />
<br />
[[User:Bob the Hamster|Bob the Hamster]]: I haven't picked a "Y" name yet. It will most likely be '''Yggdrasil''', but '''Yardarm''', '''Ypsiliform''', '''Ytterbium''', and '''Yobibyte''' are all still in the running. '''Zeitgeist''' is popular among the other devs, but I dislike it for [http://castleparadox.com/ohr/viewtopic.php?t=5116&start=75 reasons I have listed here]<br />
<br />
[[User:Msw188|Msw188]]: I agree that Zeitgeist should be disqualified due to the Smashing Pumpkins reunion album. In fact, I might have to cease OHR use if we ever have a version that is so intimately connected with such a thing.</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:Why_did_you_pick_such_strange_names_for_each_version_of_CUSTOM_and_GAME.EXE%3F&diff=17076Talk:Why did you pick such strange names for each version of CUSTOM and GAME.EXE?2008-01-25T21:23:15Z<p>Msw188: </p>
<hr />
<div>[[User:James Paige|James Paige]]: I really do have an obsession waffles. Have you ever played a word-association game? Somebody says a word, and you are suppose to say the first word that comes into your head. It is supposed to expose the subconcious connections you make between various things... except when I play that game, I always think the word "waffles" no matter what anybody says to me. Sometimes If I really clear my mind and focus, I can manage some other word that starts with a "w" like "what" "where" "why" "who" "weevil" or "warbling", but invariably I fall back to "waffle" the moment I relax.<br />
<br />
<br />
[[User:Bob the Hamster|Bob the Hamster]]: Zeitgeist, huh? I was hoping for '''zipperumpazoo''' but James says it is too long to fit on the screen.<br />
<br />
[[User:Msw188|Msw188]]: Ha, I never saw this page before. I remember when Quaternion was released, I kind of wondered if it was a reference to actual quaternions, but I figured 'no way' and decided that there must be some other use of the word that I wasn't aware of. And I never knew what Rusalka was, or Paternoster. Anyway, how come there's no 'Y', but there is a 'Z'?</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:Why_did_you_pick_such_strange_names_for_each_version_of_CUSTOM_and_GAME.EXE%3F&diff=17075Talk:Why did you pick such strange names for each version of CUSTOM and GAME.EXE?2008-01-25T21:22:01Z<p>Msw188: </p>
<hr />
<div>[[User:James Paige|James Paige]]: I really do have an obsession waffles. Have you ever played a word-association game? Somebody says a word, and you are suppose to say the first word that comes into your head. It is supposed to expose the subconcious connections you make between various things... except when I play that game, I always think the word "waffles" no matter what anybody says to me. Sometimes If I really clear my mind and focus, I can manage some other word that starts with a "w" like "what" "where" "why" "who" "weevil" or "warbling", but invariably I fall back to "waffle" the moment I relax.<br />
<br />
<br />
[[User:Bob the Hamster|Bob the Hamster]]: Zeitgeist, huh? I was hoping for '''zipperumpazoo''' but James says it is too long to fit on the screen.<br />
<br />
Ha, I never saw this page before. I remember when Quaternion was released, I kind of wondered if it was a reference to actual quaternions, but I figured 'no way' and decided that there must be some other use of the word that I wasn't aware of. And I never knew what Rusalka was, or Paternoster. Anyway, how come there's no 'Y', but there is a 'Z'?</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Enemies_that_respond_to_a_certain_attack&diff=16465Enemies that respond to a certain attack2007-11-30T05:19:49Z<p>Msw188: using Bob's syntax to happify the list</p>
<hr />
<div>{{revise|the list of required knowledge, as well as the reference to the community, should have links}}<br />
The easiest way to have an enemy react in a specific way to a specific attack will require knowledge of the following things:<br />
*Making enemies and attacks<br />
*Making attacks chain to each other<br />
*How elements work<br />
*How spawning works<br />
<br />
Once you understand these things, you are ready to go. The idea is to assign a specific element to the attack in question, and have the enemy react to this attack by spawning a new invisible enemy who will commit the specific action as if it were the original enemy. The invisible enemy will then kill itself. Note that this will require the use of one of the eight elemental bitsets available.<br />
<br />
== Implementation ==<br />
Let us use "element 8" as the proper element to trigger the enemy's reaction. This will most likely mean that we cannot use "element 8" for anything else in the game. First we define three attacks. One is the attack that causes the reaction. This attack should have the bitset "element 8 damage" turned on, and should have its targetting settings made so that the user will be able to target the enemy. The second attack will be the reaction itself. This is, of course, entirely up to the author, and may very well be a lengthy chain of various attacks. However, it is very important that this chain goes at a 100% chaining rate (If you would like to have the reaction only sometimes happen, take care of that with the aiming percentage of the initial attack that causes the reaction). Lastly, we need a 'self-kill' attack that targets the self and sets HP to 0% of current. The second 'reaction' attack should chain to this 'self-kill' attack 100% of the time.<br />
<br />
Next we make two enemies. First is the 'responder'. Make him as normal for now. Second is the 'reactionist', so to speak. This enemy should be invisible, untargetable by heroes, and should have the 'reaction' attack. It should also have an unholy amount of speed to ensure that it uses the 'reaction' quickly. Also don't forget to give it at least 1 HP. Everything else about it should probably be zero (especially its rewards). Now set the 'responder' enemy to spawn the 'reactionist' enemy upon being hit by an 'element 8' attack, and you are ready to go! Oh, and don't forget to make sure that someone has the attack that causes the reaction.<br />
<br />
== Alternatives ==<br />
If you are unwilling to give up an element for this purpose, there are some alternatives. The easiest case scenario would be if you knew one of the eight elements would be unavailable in the area where the enemy lives, so that you could use that element for this puposes there and still allow its other purposes in other places. If this is not an option, but you have a stat that is useless for the enemies in the given region (perhaps you do not use the Ctr stat in the area), it may be possible to rig this behavior with an extended chain of attacks. There may be other (difficult) implementation alternatives. I would recommend visiting one of the community sites and asking for help there.</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Items&diff=16464Items2007-11-30T05:16:57Z<p>Msw188: a full items page</p>
<hr />
<div>{{revise|Pictures should be added to clarify a few things; NOTE in Basics section needs answered and removed}}<br />
== Introduction ==<br />
<br />
Items are pretty simple to understand for the most part, although they do have some quirks to them. From the player's point of view, an item is anything that the player can access through the Item menu from the main menu while playing a game. From the author's point of view, any item is just a special link to either an attack or a text box, and/or a piece of equipment. The author can define up to 255 different items, all with a unique name and ID number. Each one of these items can be assigned its own unique attributes (such as what text box to link to) through the Item Editor in custom.<br />
<br />
<br />
== Basics ==<br />
<br />
Defining items is easy. Go into the Item Editor from custom's main menu and use the up and down arrow keys to pick the ID number you want to use, and hit enter. You will bring up a menu for the item. You should first give the item a name. Item names can only be eight characters long, so make good use of special characters from your font (press CTRL+SPACE to see your available font characters). Once an item is named, it can be referred to in all other menues (and plotscripts) by ID number or name. Here we can also assign text as "Info". This is the text the player will see when they have their cursor on this item, either in their menu or in a shop.<br />
<br />
Items in and of themselves cannot 'do' anything. If you want an item use to trigger an action, that action has to be defined as an attack. So to make items heal or hurt you need a corresponding attack defined in the attack editor. Then you can assign the item to use the attack either in battle, out of battle, or both. If you want the attack to be used out of battle, make sure it has the "usable outside of battle" bitset turned onin the Attack Editor. Items can also be assigned to call a textbox out of battle. This is done using negative numbers (moving to the left) in the "When Used Out Of Battle" selection.<br />
<br />
There is a third use supported for items. They can be assigned to "Teach a spell". The assignment is an attack defined in the attack editor. This will make it so that when the player uses the item out of battle, it brings lets him choose a hero to try to teach the assigned attack to. If the hero is able to learn the attack (has it defined in a spell list in the hero editor), he will do so. Otherwise nothing will happen. NOTE: If an item is assigned an out of battle use AND a spell teaching use, I am not sure which takes priority in game. Someone should update this, or I will when I get the time to try it out.<br />
<br />
<br />
== Value and Consumption ==<br />
<br />
Items have the special privilege of being available to shops (standard OHR shops cannot sell other things like attacks, for example). Every item can be assigned a standard "Value" in the Item Editor that will be the default cost of the item in every shop that has it available. Every item's sell-back price will likewise default to one half of its assigned Value. Both of these prices can be altered on a shop-by-shop basis in the Shop Editor however, so these values are only defaults. Also, they are not automatically visible to the player outside of a shop where they are being bought or sold. If you want the player to know this "Value", you should list it in the "Info" text.<br />
<br />
Items also can be assigned a standard consumption rate. There are three choices, and they can be cycled through on a line about half-way down the list in the Item Editor, which will default to "Unlimited Use". The other two choices are "Consumed By Use" and "Cannot be Sold/Dropped". These are pretty self-explanatory, but one should note that "Cannot Be Sold/Dropped" automatically implies "Unlimited Use". There is no simple way to prevent a player from being able to 'drop' an item, and at the same time have it be consumed if he uses it. For suggestions on this see the bottom of this page, -Advanced Item Techniques-. Another thing to note is that all of this is based on using the item through the menu, NOT on using it as equipment, which will be explained next.<br />
<br />
<br />
== Items as Equipment ==<br />
<br />
Any item can be set to be equippable in one (and only one) of the five equipment slots. If the item is a weapon, then it can also be assigned a graphic and palette, a handle point (to match with the handle point assigned in the weapon graphic editor), and a "When Used as a Weapon" attack. This attack must be defined in the attack editor, and it will be the hero's standard attack in all battles where this weapon is equipped. Using an item as equipment in this way does not consume the item (currently there is no way to have a weapon be consumed by its own use as a regular attack).<br />
<br />
As long as an item is equippable in any of the five slots, it can be assigned "Stat Bonuses". In this way equipment can affect any stat, both positively and negatively. It can also be assigned "Equipment Bits", which basically endow certain elemental effects upon the wearer. This does NOT affect an elemental weapon's attack. To do that you should make the relevant attack have an elemental bitset in the attack editor. Finally, an equippable item needs to be told what heroes can equip it in the "Who Can Equip?" menu. Note that none of this information (stats, bits, or who can equip) is visible to the player highlighting the item in game. If you would like the player to know these things, you should find a way to show this information in the "Info" text for that item.<br />
<br />
<br />
== Item Tags ==<br />
<br />
Every item can affect tags in four ways. The four designations are pretty self-explanatory, except that ownership of an item is fulfilled whenever the item is either in the inventory OR is equipped (equipped items do not count as being in the inventory). You should not give the same tags to more than one item. Also note that assigning tags here in the Item Editor does NOT name the tags. To do that you should go to the Tag Editor and name the relevant tags.<br />
<br />
<br />
== What Item's Cannot Do ==<br />
<br />
Items cannot be assigned to call plotscripts. However, they can call a textbox that itself is set to call a script instead of itself all the time. Unfortunately, this means they can never pass arguments to a script.<br />
<br />
Items are used and sold one at a time. However, without plotscripting, items cannot be dropped by the player one at a time. There should never be a need for this kind of functionality in a standard OHR RPG, because...<br />
<br />
There is no easy way to limit the number of items a player can carry, even with plotscripting. The standard item menu in game has a LOT of room, and items are grouped in one slot up to 99 at a time. If a player acquires more than 99, the items in question begin a new group in a new slot. Thus the player should never have a need to throw one of anything away.<br />
<br />
Equipped items are not considered part of the inventory. That means that equipped items cannot be used in the item menu, and thus cannot use their "When Used In Battle" attack at all unless they are unequipped BEFORE the battle. This is because equipment cannot be changed during a battle.<br />
<br />
Items, like attacks, are not very flexible. Once defined in custom, they cannot be altered in any way mid-game via plotscripts (contrast with things like Maps and NPCs which can be plotscripted on the fly). In addition, although plotscripts can refer to items by name, they cannot read any other data about them directly from the RPG file. If you would like to know, say, the attack ID that a certain item uses outside of battle in the middle of a plotscript, you have no choice but to manually construct a scripted 'lookup table'.<br />
<br />
<br />
== Advanced Item Techniques ==<br />
<br />
Although items cannot pass arguments to scripts, different items can be set to call different text boxes which call different scripts. In this way one can, in theory, have a separate plotscript for every single item, and thus handle any and all item use outside of battle with scripts. This can allow many fancy techniques like items that only work on certain maps, or that have random effects outside of battle (no such functionality inside of battle), and plenty of other things.<br />
<br />
One thing that you can use the above scripting idea for is to force "Cannot Be Sold/Dropped" items to be consumed on use. Have the item call a textbox that calls a script that performs the desired function (although this is rarely easy) and then deletes one instance of the item. Once again, this does not work in battle, unless you are willing to get into some very heavy "Instead of Battle" and "After Battle" plotscripts.<br />
<br />
The "inventory(Item:name)" command can be used to determine how many of an item is in the player's inventory, although there is no easy way to count equipped copies of the item. There is also no easy way of discovering things like what item the player last used, or was last obtained. Saving the current state of the inventory is a fairly massive task that requires setting aside global variables for every defined item in the game, even if the player does not have them.</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:Enemies_that_respond_to_a_certain_attack&diff=16462Talk:Enemies that respond to a certain attack2007-11-30T03:27:47Z<p>Msw188: New page: I don't really know how to make a simple, bulleted list, which is what I really wanted for that list of required knowledge. If anybody could clean that up, or explain to me how to do it, ...</p>
<hr />
<div>I don't really know how to make a simple, bulleted list, which is what I really wanted for that list of required knowledge. If anybody could clean that up, or explain to me how to do it, that would be grand. This is my first full page, I hope it is okay.</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Enemies_that_respond_to_a_certain_attack&diff=16461Enemies that respond to a certain attack2007-11-30T03:25:59Z<p>Msw188: reworded revise reason</p>
<hr />
<div>{{revise|the list of required knowledge, as well as the reference to the community, should have links}}<br />
The easiest way to have an enemy react in a specific way to a specific attack will require knowledge of the following things:<br />
<br />
-Making enemies and attacks<br />
<br />
-Making attacks chain to each other<br />
<br />
-How elements work<br />
<br />
-How spawning works<br />
<br />
Once you understand these things, you are ready to go. The idea is to assign a specific element to the attack in question, and have the enemy react to this attack by spawning a new invisible enemy who will commit the specific action as if it were the original enemy. The invisible enemy will then kill itself. Note that this will require the use of one of the eight elemental bitsets available.<br />
<br />
== Implementation ==<br />
Let us use "element 8" as the proper element to trigger the enemy's reaction. This will most likely mean that we cannot use "element 8" for anything else in the game. First we define three attacks. One is the attack that causes the reaction. This attack should have the bitset "element 8 damage" turned on, and should have its targetting settings made so that the user will be able to target the enemy. The second attack will be the reaction itself. This is, of course, entirely up to the author, and may very well be a lengthy chain of various attacks. However, it is very important that this chain goes at a 100% chaining rate (If you would like to have the reaction only sometimes happen, take care of that with the aiming percentage of the initial attack that causes the reaction). Lastly, we need a 'self-kill' attack that targets the self and sets HP to 0% of current. The second 'reaction' attack should chain to this 'self-kill' attack 100% of the time.<br />
<br />
Next we make two enemies. First is the 'responder'. Make him as normal for now. Second is the 'reactionist', so to speak. This enemy should be invisible, untargetable by heroes, and should have the 'reaction' attack. It should also have an unholy amount of speed to ensure that it uses the 'reaction' quickly. Also don't forget to give it at least 1 HP. Everything else about it should probably be zero (especially its rewards). Now set the 'responder' enemy to spawn the 'reactionist' enemy upon being hit by an 'element 8' attack, and you are ready to go! Oh, and don't forget to make sure that someone has the attack that causes the reaction.<br />
<br />
== Alternatives ==<br />
If you are unwilling to give up an element for this purpose, there are some alternatives. The easiest case scenario would be if you knew one of the eight elements would be unavailable in the area where the enemy lives, so that you could use that element for this puposes there and still allow its other purposes in other places. If this is not an option, but you have a stat that is useless for the enemies in the given region (perhaps you do not use the Ctr stat in the area), it may be possible to rig this behavior with an extended chain of attacks. There may be other (difficult) implementation alternatives. I would recommend visiting one of the community sites and asking for help there.</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Enemies_that_respond_to_a_certain_attack&diff=16460Enemies that respond to a certain attack2007-11-30T03:22:44Z<p>Msw188: Full version of this page</p>
<hr />
<div>{{revise|the list of required knowledge should have links, as well as reference to community}}<br />
The easiest way to have an enemy react in a specific way to a specific attack will require knowledge of the following things:<br />
<br />
-Making enemies and attacks<br />
<br />
-Making attacks chain to each other<br />
<br />
-How elements work<br />
<br />
-How spawning works<br />
<br />
Once you understand these things, you are ready to go. The idea is to assign a specific element to the attack in question, and have the enemy react to this attack by spawning a new invisible enemy who will commit the specific action as if it were the original enemy. The invisible enemy will then kill itself. Note that this will require the use of one of the eight elemental bitsets available.<br />
<br />
== Implementation ==<br />
Let us use "element 8" as the proper element to trigger the enemy's reaction. This will most likely mean that we cannot use "element 8" for anything else in the game. First we define three attacks. One is the attack that causes the reaction. This attack should have the bitset "element 8 damage" turned on, and should have its targetting settings made so that the user will be able to target the enemy. The second attack will be the reaction itself. This is, of course, entirely up to the author, and may very well be a lengthy chain of various attacks. However, it is very important that this chain goes at a 100% chaining rate (If you would like to have the reaction only sometimes happen, take care of that with the aiming percentage of the initial attack that causes the reaction). Lastly, we need a 'self-kill' attack that targets the self and sets HP to 0% of current. The second 'reaction' attack should chain to this 'self-kill' attack 100% of the time.<br />
<br />
Next we make two enemies. First is the 'responder'. Make him as normal for now. Second is the 'reactionist', so to speak. This enemy should be invisible, untargetable by heroes, and should have the 'reaction' attack. It should also have an unholy amount of speed to ensure that it uses the 'reaction' quickly. Also don't forget to give it at least 1 HP. Everything else about it should probably be zero (especially its rewards). Now set the 'responder' enemy to spawn the 'reactionist' enemy upon being hit by an 'element 8' attack, and you are ready to go! Oh, and don't forget to make sure that someone has the attack that causes the reaction.<br />
<br />
== Alternatives ==<br />
If you are unwilling to give up an element for this purpose, there are some alternatives. The easiest case scenario would be if you knew one of the eight elements would be unavailable in the area where the enemy lives, so that you could use that element for this puposes there and still allow its other purposes in other places. If this is not an option, but you have a stat that is useless for the enemies in the given region (perhaps you do not use the Ctr stat in the area), it may be possible to rig this behavior with an extended chain of attacks. There may be other (difficult) implementation alternatives. I would recommend visiting one of the community sites and asking for help there.</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:Items&diff=16458Talk:Items2007-11-30T02:39:43Z<p>Msw188: New page: I think that I could improve this page, but to do so I would need to remove a lot of what is already there. What is the standard procedure here? If I go in and delete stuff, will it stil...</p>
<hr />
<div>I think that I could improve this page, but to do so I would need to remove a lot of what is already there. What is the standard procedure here? If I go in and delete stuff, will it still be saved somewhere in case the person who wrote it had definite plans for improving it? Is this okay to do, or should we ask the author for permission first?</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Making_Complex_Attacks&diff=16457Making Complex Attacks2007-11-30T02:37:10Z<p>Msw188: /* Stat Increasing/Lowering Attack */</p>
<hr />
<div>Tired of your boring attacks? Well, we have the cure for you! Add varity to your RPGs with these fantastic attack ideas! Well, what are you waiting for? Dig into our great list of attacks!<br />
<br />
'''''Feel free to add your attack ideas here, or suggest an attack you want made in discussion, it would be greatly appreciated!'''''<br />
<br />
= '''Common Ideas''' =<br />
<br />
These are ideas that everyone will most likly need to know and are in most RPGs. These are simple and many people new to OHR will like to know them. Here are ways that you can achive them if you don't yet know how. These ideas are easily customizable so you can try lots of different things to them.<br />
<br />
Be sure to read [[How can I make an attack do an exact amount of damage each time?]] if you would like certain attacks to do so, such as healing attacks.<br />
<br />
== Healing Attack ==<br />
<br />
Healing attacks are very simple. These attacks are often also used outside of battle, as [[Items]]. We will call this attack "Heal."<br />
<br />
* Make an attack.<br />
** Set the Target: ''Ally'' makes the attack usable on your heroes instead of the enemys.<br />
** Set the Damage: ''Pure'' prevents defense and magic defense from being included in the calculations. <br />
** Set the Base Atk Stat: 100 makes the attack do 100 damage, independent of the abilities of the hero who is using the item. You can raise and lower the damage by changing the Extra Damage, which is a percent of the normal damage <br />
** Edit the attack's bitsets, and turn on.<br />
*** "Cure instead of Harm" So that the attack will heal.<br />
*** "Usable outside battle" So it can be used as an item.<br />
*** "Do Not Randomize" So that it will always be the same.<br />
<br />
It's is basically all beacuse of the "Cure instead of Harm" which raises the target stat instead of lowering it.<br />
<br />
<br />
''You may also want to see:''<br />
*[[How do I make an item or spell that revives dead heroes?]]<br />
*[[How do I increase Maximum HP or MP through an Item?]]<br />
<br />
== Stat Increasing/Lowering Attack ==<br />
<br />
These attacks can increase stats such as Atk, Mag, and Def in battle. Although they can only be used in battle, and the stats go back to normal after the battle.<br />
* Make an attack.<br />
* Set the damage, it shouldn't too much unless it is a powerful attack.<br />
* Set the ''Target stat:'' to whatever stat you want to damage.<br />
Doing this you can damage stats like, attack, so when you use an attack it won't be as powerful.<br />
<br />
You can also raise the target stat, simply set the "Cure Instead of Harm" bitset on, and set the target settings to "Ally." In most cases this attack will also need to have the "Allow cure to exceed maximum" bitset on, so that it can raise the stat beyond its standard value.<br />
<br />
== Random Multiple Attacks ==<br />
<br />
The key to making complex attacks is chaining. Chaining is where you set one attack to "link" to another. There's a couple options to how it can link, primarily to set the probability of the second (or third, or fourth...) attack happening. Pummel is an attack that will repeat, for a random amount of times, until it stops. It is done by chaining attacks. We'll call this "Pummel."<br />
<br />
<br />
This "Pummel" attack is easy:<br />
* First, create an attack. Pummel is usually set to do low damage, since it will repeat.<br />
* Then, go to "Chaining" on the attack menu, and set it to chain to itself.<br />
* Make sure to give it a Chain Rate of less than 100%! Or it will keep going until the monster is dead. For those who don't know about percentage, 100% is all the time. 75% is most of the time. 50% is half the time. 25% is one quarter of the time.<br />
And that's all you need to do!<br />
<br />
Then in the game, when you use pummel it will attack, and if your lucky it will attack again, and again. Congrats! You did Pummel!<br />
<br />
----<br />
<br />
''WARNING'': If the attack has some type of requirement (HP,MP, or Gold), it will be deducted each time it attacks. So, if your pummel attack hits 5 times, and requires 5 MP to use, you'll lose 25 MP. <br />
<br />
However, this can be a convincing attack if it's like '''Steal MP''', and it has a negative MP requirement. Each time it attacks, you would gain that much MP. Beware, for unknown reasons, HP and MP don't do "negative requirements"...<br />
<br />
<!--@ Raekuul: I integrated your comment into the text.--><br />
<!--@ Thanks, man!--><br />
<br />
However, there is a way to aviod having the requirments repeated. (i.e. 5 attacks at 5 MP cost only equals 5 MP lost) It is just as easy, but takes slightly more effort:<br />
<br />
* Create an attack. This will be the first "blow" in the attack.<br />
* Create a second attack, which will be sucvessive blows.<br />
* Make sure it has no requirements!<br />
* Chain the first attack to the second, with 100% probability.<br />
* Chain the second attack to itself, and give itself less than 100%.<br />
<br />
And, voilá!<br />
<br />
== Charging Attack ==<br />
<br />
This is a way you can make an attack, that you must wait for a long time to unleash (like charging energy so the attack will be more powerful), but the damage should be alot.<br />
* To make a "Charging Attack," simply increase the "Delay Before Attack" alot.<br />
* Attacks like this are very powerful. So set the damage high.<br />
<br />
== Extended Animations ==<br />
<br />
Ok, let's say you have an attack (say, Über-l337 Gigadoken), but it just can't work with only three frames! Enter the "Extended Animation!"<br />
* Identify the main "segments" of the attack. Example: Ball of energy flies from sky to hero, ball of energy shoots to monster<br />
* Make seprate attacks for each segment, depicting said actions<br />
** Give it the "Don't show damage" bitset, and make it give no damage, except for the last segment, which should do however much damage the attack does.<br />
** That said, if you want more than one part to do damage or whatever, feel free to do that.<br />
* Chain each segment to the next, with a probability of 100%<br />
* The hero should have the first segment as an attack. That way it will show all the parts.<br />
<br />
TADA! Your done, and know you have a really spiffy attack!<br />
<br />
== Critical Hits ==<br />
<br />
This is more of an idea than a attack. It lets you give your attacks critical hits! Which are powerful blows that may rarely come after any attack. Something you get if you're lucky. <br />
<br />
* Make an attack, this will be your Critical Hit, it is rare, and should do alot of damage, but not too much.<br />
* Perhaps make the animation just a big CRITICAL HIT! or somthing spiffy. If not, put critical hit in the captions box. <br />
* Anyway, then go to most of your attacks that don't have a chain on them, and chain them to, CRITICAL HIT! But make the chain rate about 10% or lower.<br />
<br />
[[Image:Chainrate10_howto.PNG]]<br />
<br />
This means, that when you use most attacks, there is a rare chance of getting an extra blow in there!<br />
* Try making an attack, that is slightly weaker than other attacks, but has a higher chance of getting a critical hit. An attack like this should not cost MP, since it has already sacraficed how much damage it does.<br />
<br />
== Status Side Effects ==<br />
<br />
Perhaps you want an attack like "Poison Punch." It will do damage but also may inflict poison on the enemy.<br />
<br />
* Make the attack, with damage and such.<br />
* Then make it chain to the attack that poisons the enemy.<br />
<br />
You can set the chain rate to 100% if you want it to always poison the enemy. Or less, if you want it to occasionally poison the enemy. You can use this idea with all status effects.<br />
<br />
<br />
''If you don't yet know how to use status effects see:''<br />
* [[Stun, Regen, Poison, and Mute]]<br />
<br />
= '''Specific Ideas''' =<br />
<br />
Here are some attacks that aren't used in every game, but they are neat ideas if you are looking some interesting attacks. Some of these are rather complex, and a new programmer may have trouble using some.<br />
<br />
== Stat Stealing Attack ==<br />
<br />
Perhaps your hero is a vampire type, and can steal enemies energy to use against them. Maybe by taking Attack from a monster, the hero can up his? Whatever the effect, you can steal stats from monsters, and this will show how:<br />
* Make an attack that has the following characteristics:<br />
** Target stat is whatever stat you want to steal<br />
** It should have the following bitsets on:<br />
*** Absorb Damage<br />
** It would probably look best if you use a "Reverse Projectile" graphics, to show that you're stealing a stat.<br />
<!--@ Thank you to Raekuul for this blindingly obvious info! --><br />
<br />
== Random Attacks ==<br />
<br />
This is a whole ''way'' to attack. We will call this "Choas Box." The Chaos Box is a spell list, that is set to random. When used, it may do many things, sometimes good, really good, or sometimes bad, very bad. <br />
* Go to a Hero's Menu, and name a spell list, "Chaos Box," or some other spiffy name.<br />
* Then set the type of list to random effects.<br />
* Then make many attacks, some that will be standard, some that may attack many at once, some that will heal, and some that will heal enemies, some that will hurt heros, and some that cause status effects, be creative.<br />
** Make sure you set the "Automatically Choose Target" bitset on for each.<br />
* Then go back to the spell list and add all the attacks, make ones that are more common by adding multiple of those.<br />
* Then you are done.<br />
So if the player likes to take gambles than this is good for him/her!<br />
<br />
== Copy Attack ==<br />
<br />
This is a very cool idea, but it requires you to not use the "Steal Item" normally in the game. This attack copies an enemies attack. But it doesn't become usable until after the battle.<br />
* First, make your copying attack, make the animation or damage anything you want, but be sure to set the "Steal Item" bitset on.<br />
* For most enemies, create an item that will teach the hero how to use the enemies main attack.<br />
<br />
* Then for each enemy, in the "Rewards Menu"<br />
** Select the appropriate Item in Stealable Item<br />
** Make the Steal availability to unlimited, steal rate close to 100%, so it might not always work.<br />
<br />
Then, in the game, when you steal that item, you can teach it to your hero and he know can use that enemy's main attack! You can make these Items sellable, in case they get multiple ones.<br />
<br />
* Remember to change he global text strings! Edit all the ones about stealing.<br />
<br />
[[Image:global_attackhowto.PNG]]<br />
<br />
== HP/MP Reading Attack ==<br />
<br />
The Scan move from Final Fantasy games allows the player to see how much HP and MP an enemy has left before it dies. This can be important, strategically, in that you can focus more on high-powered attacks if an enemy is close to death.<br />
<br />
To implement an attack that reads HP, just follow these steps:<br />
* Make a new attack, call it "Scan" (or whatever you wish to call it).<br />
* Make it do nothing, but chain to an attack called "HP Left."<br />
* Then work on that attack.<br />
<br />
* Set the caption to something along the lines of "Scanning HP..."<br />
* Set the damage formula to "HP = 0% of current"<br />
<br />
[[Image:Liferead_hotwo.PNG]]<br />
<br />
* Set the following bitsets on it:<br />
** Ignore attacker's extra hits (so it only scans once)<br />
** Show damage without inflicting (so that you only ''show'' the damage, not actually do it)<br />
** Do not randomize (so that it shows ''exactly'' the HP, not +/- 20 points)<br />
** Mutable (if it's a magical attack, and you're using the mute status effect)<br />
** Show attack name (it will show the damage, then have "HP Left" next to it)<br />
<br />
[[Image:Bitsets_howto.PNG]]<br />
<br />
And, voila! When this attack is used on an enemy (or, a hero even), their current HP will "pop up" like regular damage, but they won't actually take damage. Also be sure to give the player the "Scan" attack, not the "HP left."<br />
<br />
To scan MP, you do exactly the same thing, but you set the Target stat to MP instead of HP. Also, be sure to change the caption, so as not to mislead players. You can also target other stats, but they are generally not as useful to know.<br />
<br />
If you want your Scan attack to scan both HP '''and''' MP, then you can make one attack for each, and then chain the HP attack to the MP attack, and it will do one after the other.<br />
<br />
== Quick Escaping Attack ==<br />
<br />
* Make an attack, that does no damage, but set the "Cause to run away" bitset on.<br />
<br />
Then if a player needed to run, but had little HP left and didn't think they had time to hold ESC. They could use they could use this attack to escape quickly.<br />
<br />
* Just as convenient would be to use the attack bitset: "Cause heroes to run away".<br />
<br />
However, it should be taken into account that this will not let your heroes run away if an enemy with the "unescapable" bitset is on the battle field.<br />
<br />
== Summoning Attacks ==<br />
A popular idea that supposedly began with a Final Fantasy title was to Summon Monsters into battle and have them attack. This is possible, but due to the size limitation of an Attack, you won't be able to Summon anything very large.<br />
<br />
To do this, you might want to start by making some sort of spiffy animation that brings a monster forth, like a bolt of lightning or a swirl of fire. Then, you'll need to make the actual monster picture, but it has to be an Attack picture, '''not an Enemy picture.''' If you want you can make it animate somehow, like making it fly, walk, laugh, roll, whatever. It's up to you!<br />
Finally, you'll want the actual attack animation that the Monster delivers, which can be anything that's appropriate for the monster, or you could recycle one of your already-made attack animations.<br />
<br />
Now, let's go into the Attack editor. If you decided to have a "summoning-in-progress" animation, then start with that. This will be an attack indicating that the summoning has started, so it should have almost no delay. It should also do no damage, so in the damage screen, be sure to select "No Damage." You should also go into the Attack Bitsets and turn on "Do not display damage" so that you don't have a 0 showing up on your target(s).<br />
Since this is a "summoning-in-progress" attack, you should do two last things:<br />
*Be sure to chain it to the Summoned Monster at a 100% chance, unless you have a reason for a lower percentage.<br />
*You might want to add a caption that says "Summoning [monster]..." if you want.<br />
<br />
As for the actual summoned monster, you should give it a fairly large Delay time, since Summons are considered powerful and time-consuming. Then, you should have Monster move toward the enemy in an appropriate fashion. If it's a winged creature, you might try the "Meteor" movement. If it's a walking critter, you should use the "Projectile" movement. And so on!<br />
<br />
Once again, since the actual attack hasn't been dealt yet, it should deal "No Damage" and the "Do not show damage" should be on. Now, for two more things:<br />
*Be sure to chain the Monster to its attack with a 100% chance.<br />
*If you want, you can have a caption saying "Summoned [monster]!" or "[Monster battle cry]!"<br />
<br />
Finally, you'll want to have the actual attack that the monster deals, which can be anything you want. Chances are you've already made a simple attack that could work for a monster. All in all, '''use your imagination!'''<br />
<br />
----<br />
<br />
{{HOWTO}}<br />
<br />
[[Category:HOWTO Chapters]]<br />
[[Category:Unfinished Articles]]<br />
[[Category:Battles]]</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:Will_there_ever_be_overhead_pixels%3F&diff=16379Talk:Will there ever be overhead pixels?2007-11-19T19:49:22Z<p>Msw188: New page: This question needs to be fixed up with a link to whatever page discusses making layers. I don't yet know exactly how to do that. I'm also unsure about how to change classifications, etc...</p>
<hr />
<div>This question needs to be fixed up with a link to whatever page discusses making layers. I don't yet know exactly how to do that. I'm also unsure about how to change classifications, etc. I mean, this really shouldn't be under "things that cannot be done" anymore.</div>Msw188https://rpg.hamsterrepublic.com/ohrrpgce/index.php?title=Talk:Can_you_modify_experience_outside_of_battle_with_plotscripting%3F&diff=16378Talk:Can you modify experience outside of battle with plotscripting?2007-11-19T19:41:51Z<p>Msw188: /* 32 bit */ new section</p>
<hr />
<div>Heh... worth asking. I knew that you could modify levels that way...<br />
The easiest way to add XP is a 'fake' fight with an enemy with incredible speed with a suicidal attack. Not the most noble way to do so...<br />
<br />
<br />
NeoTA: it should be doable, like this:<br />
<br />
set hero experience( heronum, high, low)<br />
get hero experience hi( heronum)<br />
get hero experience lo( heronum)<br />
<br />
.. get* commands would take the high and low 16 bits of the exp, respectively. so 'high' is the number of 65536's, and low is the number of ones. Low is 'unsigned'( so the set command has to remap -32767 - +32768 to 0 - 65535, since all numbers in scripts are signed.). add hero experience would be similar to set.<br />
a simple hack.<br />
<br />
'''TMC:''' But it's too complicated to be understood by most. They wouldn't understand how to use the two variables.<br />
<br />
I suggested a simple command to add experience, and I suppose subtract it too, in the range -32768 to 32767. This way, you could reward the player (which is what you normally want to do with experience). The command would have an optional argument to ''not'' level a hero when they reached the right amount of experience, and return the amount actually subtracted/added.<br />
<br />
Also, a command to correctly adjust level. These would improve experience to the possition of money.<br />
<br />
''NeoTA'': ok, sneakier hack:<br />
<br />
set hero experience( Hero:Bob, 1,000,000,000)<br />
<br />
add hero experience( Hero:Bob, 1,000,000,000)<br />
<br />
With 5 parameters, the last 4 creating the number (as it would be written with commas every third digit from right). The last 3 parameters would be optional and default to 32767. this would be used to detect the end of the pseudo-number.<br />
<br />
'''Mike''': Um... wow, that's clever. But, not everyone's used to typing commas in numbers, much less in any sort of scripting. However, there's something you're missing: the highest experience one can aquire is 51183838. Rather, that's the experience required to get to level 100. So, we wouldn't need 4 number parameters. In fact, it could be dangerous, since:<br />
<br />
set hero experience( Hero:Bob, 2,147,483,648) (note that it's the max + 1)<br />
<br />
would cause an overflow.<br />
<br />
'''Bob''': How about we implement NeoTA's high/low suggestion as "advanced" commands, and then use those as a base to implement the other suggestions in hamsterspeak? (same for gold also)<br />
<br />
'''Patsen''': It sounds solid... Being able to modify experience out of combat allows for non-murder based experience. Considering I'm currently working on a D&D based engine, it would be quite an asset. I read of a way to adjust levels, but that's dodgy at best. Even combatless games could enjoy some way of gaining experience, with levels being a parameter for out of combat random things, or simply a score of some sort. Regardless, I'd love hearing news on development of the like. Flawless code being nigh impossible, clever hacks show a programmer's guile.<br />
<br />
'''Patsen''': In reality, I should log in before posting. In reply to NeoTA's post, he claims it's already possible. I just want to make sure, I'm still working on stats before I start any scripting, so I'd like to know what I have to work with before I start.<br />
<br />
'''NeoTA''': I meant it is possible to implement.<br />
<br />
My other suggestions have to be hardcoded too, cause they require division by 65536. TMC's suggestions could work ok written in HS.<br />
<br />
'''TMC:''' D'oh. I suggested the 1,000,000,000 trick elsewhere and forgot about it.<br />
<br />
Hard coding them is not necessary. Firstly, you can divide by 65535 with signed shorts (if you are sneaky), but is there a real need to remap the number range anyway? Why not just have the highno as exp/32768?<br />
<br />
'''Mike''': Heh,<br />
<br />
Being able to modify experience out of combat allows for non-murder based experience.<br />
<br />
Is it really murder, since they ambush you? ;)<br />
<br />
In any case, at least ''some'' command needs to be hard coded. I don't think we can hijack get/setherostat(). Well, actually, we could, now that I think about it.<br />
<br />
Hmm, the implementation of the 1,000,000,000 Exp Function*... Urgh, not only do we need to work with the seprate Words, we need to convert from the "Decimal Words" to the "Binary Words". And given the small number space, I suspect it'll be easier to hard code.<br />
<br />
<nowiki>*</nowiki> - Attempted parody of the $64,000 Question (or should it be the $65536 Question? ;) )<br />
<br />
'''NeoTA''': <br />
Ok, I have a prototype in Python. The only python-ism it uses are lists<br />
(ie. you know the number of 'fragments' in advance rather than having to look for the first 32767.) <br />
<br />
Prototype follows:<br />
<br />
"""Prototype of conversion decimal-list to number<br />
for 'set hero experience' command"""<br />
<br />
<br />
# a list of testcases.<br />
# Termination is implied and is needed for the actual HSpeak stuff.<br />
# <br />
testcases = [<br />
[123], <br />
[ 2,345],<br />
[111,012],<br />
[ 1,234,456],<br />
[ 55,444,333],<br />
[ 999,999,999,999,999,999,999], #silliness. python handles it correctly.<br />
]<br />
<br />
def dec2num(dec):<br />
"""Unhack a 1,234,456 format number into an ordinary integer.<br />
Accepts any sequence (eg. list, tuple)<br />
"""<br />
#find the length<br />
declen = len(dec)<br />
mul = 1<br />
#decide the multiplier for the first fragment<br />
while (declen > 1):<br />
mul = mul * 1000<br />
declen -= 1<br />
n = 0<br />
index = 0<br />
# add the fragments in, highest-first<br />
while (mul > 0):<br />
n += dec[index] * mul<br />
index += 1<br />
mul /= 1000<br />
<br />
return n<br />
<br />
# try each testcase<br />
for tc in testcases:<br />
print (tc, dec2num(tc) )<br />
<br />
<br />
<br />
The logged results:<br />
<br />
([123], 123)<br />
([2, 345], 2345)<br />
([111, 10], 111010)<br />
([1, 234, 456], 1234456)<br />
([55, 444, 333], 55444333)<br />
([999, 999, 999, 999, 999, 999, 999], 999999999999999999999L)<br />
<br />
'''Mike''': That's all well and good, but that won't work in HamsterSpeak, even if we try to translate it. Doing it in QB is no problem.<br />
<br />
Hmm, on a side note, it seems that Python has the array behaviour that TMC wants. I.e. you can treat your entire argument list as an array (unless, of course, you have to wrap a tuple in [] before you can pass it...)<br />
<br />
'''NeoTA''': For the 'args as array' form that you want, you would:<br />
<br />
def yourfunc( *args): # <br />
# Stuff goes here<br />
<br />
then when you wanted to call it:<br />
<br />
# assume args is a tuple of arguments.<br />
# I'll assign it here to clarify<br />
yourfunc( 0, 1,2,3) # so in yourfunc, args becomes the tuple (0,1,2,3)<br />
# you can also unpack a sequence, which is functionally equivalent to writing it out manually<br />
args = (0,1,2,3)<br />
yourfunc( *args)<br />
<br />
<br />
Or you mean the scripting arguments? That's implemented as a tuple in Jormungand. Some of the scripting functions are working.<br />
that looks simpler, like :<br />
<br />
def setherowalkpalette(v):<br />
hero, palette = v[0], v[1]<br />
# do stuff<br />
<br />
args = (0, 16)<br />
setherowalkpalette( args ) # this is the convention required by HS, because default-values are handled by the HS interpreter rather than the Python interpreter.<br />
<br />
Also, the difference between lists and tuples is that tuples are immutable, and hence can only contain hashable objects. And tuples are (val, val, val)<br />
whereas lists are [val,val,val]<br />
<br />
'''Mike''': I didn't ask for a complete description of tuples vs lists, and the methods of passing them. It just... never mind. My first statement still stands.<br />
<br />
'''NeoTA''': Certainly. I'm opportunistic.<br />
<br />
'''TMC:''' HS can too! This prototype generates two numbers for a setexp function, where exp is high * 32768 + low. Just divert your eyes from the screen to avoid retina burns<br />
<br />
define script (-1, set hero experience, 0, -1, -1, -1)<br />
script, set hero experience, who, n1, n2, n3, begin<br />
while (n3 == -1) do (<br />
n3 := n2 <br />
n2 := n1<br />
n1 := 0<br />
)<br />
<br />
#convert from val = 1000000*n1 + 1000*n2 + n3 to val = 2^20*n1 + 2^10*n2 + n3<br />
n3 -= n2 * 24 <br />
n2 += n3 / 1024<br />
n3 := n3 ,mod, 1024<br />
<br />
n3 -= n1 * 448 #this is (2^20 = 1,048,576) - 1,000,000<br />
n2 -= n1 * 47<br />
<br />
n2 += n3 / 1024<br />
n3 := n3 ,mod, 1024<br />
if (n3 << 0) then (n3 += 1024, n2 -= 1)<br />
n1 += n2 / 1024<br />
n2 := n2 ,mod, 1024<br />
if (n2 << 0) then (n2 += 1024, n1 -= 1)<br />
<br />
variable(vallow, valhigh)<br />
valhigh := n1 * 32 + n2 / 32<br />
vallow := (n2 ,mod, 32) * 1024 + n3<br />
#set experience(who, valhigh, vallow)<br />
)<br />
<br />
This isn't suitable for setting money because it overflows if roughly n1 > 70 <br />
<br />
Ok, I admit it, I did that only for fun.<br />
<br />
'''Mike''': O_O *rubs eyes* My brain... not follow... <pre>CAN NOT COMPUTE. GENERAL PROTECTION FAULT AT 0x82384</pre><br />
<br />
'''Patsen''': Wow... a complex algorithm depending on constants calculated from seven digit arithmetic with little to no real explanations of the math behind it and why it works... If my degree weren't so entwined with math, I wouldn't even try to decypher it!<br />
<br />
== 32 bit ==<br />
<br />
Isn't Hamsterspeak 32 bit now? Can we remove the bit about 16 bit limitations, and make a simple plotscripting command to get the hero's experience if it isn't already there? (If it is there, we should document it properly here)</div>Msw188