OHRRPGCE feature requests/suggestions

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

Post Reply
User avatar
guo
Metal Slime
Posts: 749
Joined: Fri Dec 04, 2009 9:12 pm

OHRRPGCE feature requests/suggestions

Post by guo »

Hello,

I wanted to start a thread for suggestions & feature requests. These aren't demands, but simply things I would like to see implemented in the future (if possible).
  • *Let us choose accuracy/dodge stats for attacks much as with attack/defence (eg use speed as dodging stat, or attack as accuracy)

    *Option to set size of textbox choice dialogue to 1 or 2 lines. This can be done at present with menus, but requires a little more time and bloats the amount of menus

    *Naming of formation sets - for ease of use when mapping

    *Hiding money on status menu

    *Using shift+arrows to change the order of items in the item editor (not sure how feasible this would be, or if it would mess things up)
What ideas do other people have?

Cheers.
vvight.wordpress.com
User avatar
The Wobbler
A Scrambled Egg
Posts: 2817
Joined: Mon Oct 15, 2007 8:36 pm
Location: Underwater
Contact:

Post by The Wobbler »

Choosing where to display a choice box would be super. Fuller controller support, alphabetical sorting of items in the item menu.
User avatar
Idontknow
Slime Knight
Posts: 219
Joined: Sat Dec 10, 2011 5:51 pm
Location: The Jerkstore
Contact:

Post by Idontknow »

I have a few related to the battle system.
  • - Make it so items can be equipped to more than one slot, like an item could be specified to be equipped to the second, third and fourth slot instead of just one, or possible dual wielding shenanigans by allowing more than one weapon to be equipped.

    - A confusion status

    - Ability to create attacks that give temporary elemental resistances/weakness
Also, I agree with Guo's suggestion of letting us choose accuracy/dodge stats. There are probably more I would request, but usually those come up when I'm working on a game and think "wouldn't it be cool if I could do THAT".
Last edited by Idontknow on Wed Oct 19, 2016 1:48 am, edited 2 times in total.
Working as intended!
User avatar
guo
Metal Slime
Posts: 749
Joined: Fri Dec 04, 2009 9:12 pm

Post by guo »

- Ability to create attacks that give temporary elemental resistances/weakness
Totally!
vvight.wordpress.com
User avatar
Gizmog
Metal King Slime
Posts: 2622
Joined: Tue Feb 19, 2008 5:41 am

Post by Gizmog »

The Wobbler wrote:alphabetical sorting of items in the item menu.
Merry Christmas

Code: Select all

Plotscript,AlphabeticalInventory,begin
variable (AlphaTainer)
variable (InventoryLoop)

AlphaTainer := CreateContainer

#Go through the entire inventory.
for (InventoryLoop,0,GetInventorySize--1)
do (
	variable (WhatItem,HowMany,ItemSlice)
	
	#Gets the ID and Quantity of the item in the given slot
	WhatItem := ItemInSlot (InventoryLoop)
	HowMany := ItemCountInSlot (InventoryLoop)
	
	#If there's no item in the slot, don't bother
	if (WhatItem == -1)
	then ( )
	
	#But if there is, create a slice to record how many and what type
	else (
	
		ItemSlice := CreateContainer
		SetParent (ItemSlice,AlphaTainer)
		SetSliceExtra (ItemSlice,0,WhatItem)
		SetSliceExtra (ItemSlice,1,HowMany)
		
		$1=""
		GetItemName (1,WhatItem)
		
		#Now the tricky part.
		variable (FirstLetter,SecondLetter,ThirdLetter)
		
		#We can only do the first three due to the limitations of OHR variables
		
		
		#This is paranoia: I don't want any old info to carry over from one loop to the next
		
		FirstLetter := 0
		SecondLetter := 0
		ThirdLetter := 0
		
		#This is also paranoia: I don't want to call a non-extant letter if there's an item smaller than three letters.
		
		
		
		If (StringLength (1)>> 0)
		then (
			FirstLetter := AsciiFromString (1,1)
			)
			
		if (StringLength (1)>> 1)
		then (
			SecondLetter := AsciiFromString (1,2)
			)
			
		if (StringLength (1)>> 2)
		then (
			ThirdLetter := AsciiFromString (1,3)
			)
			
			#If you want lower case letters to be treated the same as capitals uncomment the next lines
			
#			FirstLetter := LowerCaseToUpperCase (FirstLetter)
#			SecondLetter := LowerCaseToUpperCase (SecondLetter)
#			ThirdLetter := LowerCaseToUpperCase (ThirdLetter)			
			
			#Now we do some math.
			#Each letter is an ascii value from 0 to 255
			
			#By multiplying it, we can combine it into a single value to pass to SetSortOrder. So the final result will be like... 255255255 for LastLetterLastLetterLastLetter
			
			FirstLetter := FirstLetter * 1000000
			SecondLetter := SecondLetter * 1000
			
			#If we sorted it now, it'd be backwards, Z to A. So we make the big numbers small and the small numbers big to sort it the right way
			
#			FirstLetter := 0--FirstLetter
#			SecondLetter := 0--SecondLetter
#			ThirdLetter := 0--ThirdLetter

			#Heh! Scratch what I just said. 0-- is the route to Z first, A last. Uncomment the previous 3 lines if you'd rather it be that way.
			

			
			
			#Now set the sort order, so they'll be alphabetized later
			SetSortOrder (ItemSlice,FirstLetter+SecondLetter+ThirdLetter)

			

			#And delete the original copy of the item, just like in that movie with that guy
			
			SetItemInSlot (InventoryLoop,-1)
			
			#This quantity thing is probably paranoia
			
			SetItemCountInSlot (InventoryLoop,0)
			)
			
		)
		
#By this point the script, we've gone through every item in the inventory and the player now has nothing. AlphaTainer is full of references to the treasure they used to have. It's time to restore their former glory.

#But first we gotta alphabetize 'em or everything's pointless

SortChildren (AlphaTainer,FAlse)

variable (AlphaLoop,AlphaSlot)

#Gets the handle of the first slice..
AlphaLoop := FirstChild (AlphaTainer)

#So long as there's slices to be tallied, keep tallying..
while (AlphaLoop)
do (
	WhatItem := GetSLiceExtra (AlphaLoop,0)
	HowMany := GetSliceExtra (AlphaLoop,1)
	
	#Now adds the proper quantity of items
	SetItemInSlot (AlphaSlot,WhatItem)
	SetItemCountInSlot (AlphaSlot,HowMany)
	
	#Increases AlphaSlot by one and goes to the next slice
	
	AlphaSlot += 1
	AlphaLoop := NextSibling (AlphaLoop)
	
	#When there's no more siblings, ALphaLoop will be false, the while loop will break, and everything will be right with the world.
	)
	
#And now I gotta name and add a billion items to see if this actually works!
	


	subscript,LowercaseToUpperCase,WhatValue,begin
	#Converts the Ascii for a lower case to its Upper Case form. This way Apple would be sorted to the same place as apple. This is of course, optional.
	If &#40;WhatValue >> 96 && WhatValue << 123&#41;
	then &#40;ExitReturning &#40;WhatValue -- 32&#41;&#41;
	else &#40;ExitReturning &#40;WhatValue&#41;&#41;
	end	

#Frees all the slices to keep them from piling up over the course of the game. I forgot this line at first
FreeSlice &#40;AlphaTainer&#41;
end

#This is just a test to give me items, since I don't actually have a game to test it on
plotscript,AddItemsToTest,begin
variable &#40;GetLoop&#41;
for &#40;GetLoop,0,25&#41;
do &#40;
	SetItemInSlot &#40;GetLoop,GetLoop&#41;
	SetItemCountInSlot &#40;GetLoop,GetItemMaximumStackSize&#41;
	&#41;
	
AlphabeticalInventory
end
EDIT: Bet I can do something about that choice thing too. Way better than actually working on a game!
Attachments
Alphabetical gibberish! I didn't have anything better to work with. Should also group like.. SwordIcons with SwordIcons and so forth
Alphabetical gibberish! I didn't have anything better to work with. Should also group like.. SwordIcons with SwordIcons and so forth
WitchHunters0003.png (5.47 KiB) Viewed 16683 times
Last edited by Gizmog on Wed Oct 19, 2016 7:28 am, edited 2 times in total.
User avatar
Gizmog
Metal King Slime
Posts: 2622
Joined: Tue Feb 19, 2008 5:41 am

Post by Gizmog »

Code: Select all

#What X and Y the box should appear at
#I have it set as globals so I can keep it saved between uses. This isn't necessary for most purposes.

globalvariable &#40;1,ChoiceBoxX&#41;
globalvariable &#40;2,ChoiceBoxY&#41;

plotscript,RandomChoice,begin
#This is the script the NPC runs when you talk to it.

#This tag is turned on if the player says "Yes", they like where the choice is. The choice never moves again.


if &#40;CheckTag &#40;2&#41;&#41;

then &#40; &#41;

#But so long as the tag is off,  the box's positon is randomized.

else &#40;
	#This works a little different than you'd think
	#It's center aligned so 0 is the dead center of the screen
	#I had it set for 0,320
	#and half of the time it was off the screen and the other half it was always on the right
	ChoiceBoxX &#58;= Random &#40;-140,140&#41;
	
	#The Y axis seems to be the normal top alignment.
	
	#I could chjeck this if I really wanted to by suspending box advance and using Ctrl+F4 to open the slice collection debug, but I don't really want to
	ChoiceBoxY &#58;= Random &#40;0,180&#41;
	&#41;
	
FancyChoice &#40;1,ChoiceBoxX,ChoiceBoxY&#41;

end

plotscript,FancyChoice,WhatBox,ChoiceX,ChoiceY,begin
#Shows the textbox...
ShowTextbox &#40;WhatBox&#41;
variable &#40;ChoiceBox&#41;

#Seriously, check out the plotscripting dictionary for LookupSlice. You can do some *NASTY* stuff with this

#Looks up the choice box with a special look up
ChoiceBox &#58;= lookupslice &#40;sl&#58;textboxchoicebox&#41;

#Puts the box where we randomly determined earlier
PutSlice &#40;ChoiceBox,ChoiceX,ChoiceY&#41;

#If this were a real game, you could have a switch statement here for all of your WhatBoxes, and set your ChoiceX, ChoiceY's accordingly. Or not! 

#Wait for textbox is paranoia
waitfortextbox
end
Attachments
WAY WAY better than working on my game
WAY WAY better than working on my game
ChoiceGame0007.png (3.62 KiB) Viewed 16679 times
User avatar
Gizmog
Metal King Slime
Posts: 2622
Joined: Tue Feb 19, 2008 5:41 am

Post by Gizmog »

This multiple line stuff is a bit trickier. So far I got, tacked into the old code:

Code: Select all

#BONUS CONTENT! Let's make the text something crazy for funsies
variable &#40;Choice1,Choice2&#41;

#\n is the Line Break special character, one of those string things that's really hard to find in the dictionary. It's in the entry for $1d="some text"

$1 = "Yes\nThats Great!"
$2 = "No \nThats Awful!"

Choice1 &#58;= Lookupslice &#40;sl&#58;textboxchoice0&#41;
Choice2 &#58;= lookupslice &#40;sl&#58;textboxchoice1&#41;

SetSliceText &#40;Choice1,1&#41;
SetSliceText &#40;Choice2,2&#41;

#Because the new text is taller than the old one, we gotta move the boxes so they don't overlap

#We'll try 2 pixels more than the bottom edge of the first choice
SetSliceY &#40;Choice2,SliceEdgeY &#40;Choice1,edge&#58;Bottom&#41;+2&#41;

#And because the options are bigger, now we gotta resize the box.
But so far I haven't been able to pleasingly resize the ChoiceBox to fit its larger words. But it definitely is doable.
Attachments
ChoiceGame0009.png
ChoiceGame0009.png (4.16 KiB) Viewed 16671 times
Last edited by Gizmog on Wed Oct 19, 2016 5:43 am, edited 1 time in total.
TMC
Metal King Slime
Posts: 4310
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Whoa there Giz, an admirable effect but you've gone all-in perhaps a tad too quick, as it looks like someone's beaten you to it! I'll take "sorting strings" as your feature request though.

There ought to be options to resize the choice box (and overhauling textboxes is on the cards), but as your script showed, it's quite possible to manipulate the textbox slices to achieve a lot of things.
guo wrote:Let us choose accuracy/dodge stats for attacks much as with attack/defence (eg use speed as dodging stat, or attack as accuracy)
I keep thinking that we already have that. It's quite straightforward to add.
guo wrote:Naming of formation sets - for ease of use when mapping
Naming gets requested for lots of things. As we update the file formats for different types of objects (which happens very slowly) we'll add the option to assign names.
guo wrote:*Using shift+arrows to change the order of items in the item editor (not sure how feasible this would be, or if it would mess things up)
It's interesting how often people request the ability to reorder item definitions and other things. The answer is that the simplest implementation would mean that the item ID numbers would be wrong everywhere that you used them, and save files wouldn't be compatible either. We could automatically fix up all of those, but it's much more work. Just being able to rearrange the order the items appear in the editor without changing their ID numbers would be significantly less work, but is that good enough?
Idontknow wrote:Make it so items can be equipped to more than one slot, like an item could be specified to be equipped to the second, third and fourth slot instead of just one, or possible dual wielding shenanigans by allowing more than one weapon to be equipped.
I've seen this requested quite a few times, so I wanted to make sure that the Plan for improved items allows it. However, I might that plan might be overly complicated.

Gizmog wrote:#I could chjeck this if I really wanted to by suspending box advance and using Ctrl+F4 to open the slice collection debug, but I don't really want to
You're referring to Ctrl+F4 advancing the textbox before you get to inspect the slices, which is very annoying, but they way around it is to press F8 to get to the debug menu and open the slice debugger there.
Attachments
Since Alectormancy!
Since Alectormancy!
alphabetically.png (3.47 KiB) Viewed 16662 times
James has been working on converting built-in menus to slices. Tell him to finish it!
James has been working on converting built-in menus to slices. Tell him to finish it!
edit_status_menu.png (104.5 KiB) Viewed 16659 times
Last edited by TMC on Wed Oct 19, 2016 10:01 am, edited 1 time in total.
User avatar
guo
Metal Slime
Posts: 749
Joined: Fri Dec 04, 2009 9:12 pm

Post by guo »

That's some impressive stuff, TheGiz. What about if I want eg one line in the choice box? Just like "go on, tell me more" without the player being able to scroll down and select the empty "choice"? It's not entirely necessary, but nice to give the illusion of interactive dialogue in places.
vvight.wordpress.com
User avatar
Gizmog
Metal King Slime
Posts: 2622
Joined: Tue Feb 19, 2008 5:41 am

Post by Gizmog »

TMC wrote:Whoa there Giz, an admirable effect but you've gone all-in perhaps a tad too quick, as it looks like someone's beaten you to it! I'll take "sorting strings" as your feature request though.
Bah, you bums! Remember the time you waited till a week after OHR Typewriter to add strings?! Or the time you waited till a week after "BAD FELLOWS" to have strings that automatically wrap to the size of the screen?! Your preview of the new interpreter scares the bajeezus out of me, I barely recognize my own code!

I can't even remember my feature request... a football? No, a Red Ryder carbine action BB gun with a compass in the stock and a thing that tells time!


TMC wrote: You're referring to Ctrl+F4 advancing the textbox before you get to inspect the slices, which is very annoying, but they way around it is to press F8 to get to the debug menu and open the slice debugger there.
That's good advice that I'm probably going to forget. Thanks!
guo wrote: Oh, is that what you meant by one or two lines? Hehe, whoops!

Code: Select all

plotscript,ChoiceWithoutAChoice,begin
ShowTextbox &#40;2&#41;
FreeSlice &#40;lookupslice &#40;sl&#58;textboxchoice1&#41;&#41;
end
Though I'm sure there's some terrible,horrible, reason you're not supposed to do it this way.
Attachments
The choice doesn't flash yellow and white the way they usually do when highlighted, I dunno why, but you could fake it.
The choice doesn't flash yellow and white the way they usually do when highlighted, I dunno why, but you could fake it.
ChoiceGame0010.png (3.41 KiB) Viewed 16647 times
Last edited by Gizmog on Wed Oct 19, 2016 12:45 pm, edited 1 time in total.
TMC
Metal King Slime
Posts: 4310
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Hey now, new features turning up the next week and stealing your thunder is one thing (and I note it wasn't me to blame in either of those cases!), but in this case I beat you by over four years!
Gizmog wrote:Though I'm sure there's some terrible,horrible, reason you're not supposed to do it this way.
I was going to say "the reason is: we forgot to protect that slice", but it turns out that actually no slices are protected except the Special slices (which are things like walkabout layers, the textbox layer), Map slices, and walkabout containers. Either we can lock down everything, or we can just make sure the engine gracefully handles you deleting or modifying slices it was expecting to find. I think the latter is obviously the way to go.
User avatar
Spoonweaver
Liquid Metal King Slime
Posts: 6516
Joined: Mon Dec 08, 2008 7:07 am
Contact:

Post by Spoonweaver »

I'd like more Npcs allowed on a map at once.
User avatar
guo
Metal Slime
Posts: 749
Joined: Fri Dec 04, 2009 9:12 pm

Post by guo »

Thanks, TheGiz.

Edit: How do I shrink the box :hurr:
Last edited by guo on Wed Oct 19, 2016 11:00 pm, edited 1 time in total.
vvight.wordpress.com
User avatar
Gizmog
Metal King Slime
Posts: 2622
Joined: Tue Feb 19, 2008 5:41 am

Post by Gizmog »

guo wrote:Thanks, TheGiz.

Edit: How do I shrink the box :hurr:
Been havin' trouble with that myself, but

Code: Select all

plotscript,ChoiceWithoutAChoice,begin
variable &#40;ChoiceBox&#41;
ShowTextbox &#40;2&#41;
FreeSlice &#40;lookupslice &#40;sl&#58;textboxchoice1&#41;&#41;
ChoiceBox &#58;= lookupslice &#40;sl&#58;textboxchoicebox&#41;
#Subtracting 10 pixels, 8 for the font and 2 for the space between, seems ideal
SetSliceHeight &#40;Choicebox,SliceHeight&#40;Choicebox&#41;--10&#41;
end
Seems to work. There's codes for all kinds of different things you might want to monkey with in the Plotscripting dictionary entry for lookup slice.[/url]
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7684
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

I do think think that deleting the slice will probably be handled gracefully... Probably nothing worse than some warning spam in your g_debug.txt file.

I think a better solution is to make the second string equal to the first, and move them both to the same place on the screen

And yes, once the textbox storage format has changed, I'll add single or many choices as a built in feature
Post Reply