text changes to account for long item names

This commit is contained in:
gymnast86
2026-06-25 03:15:14 -07:00
parent 6592871fa2
commit 830b560933
9 changed files with 337 additions and 556 deletions
@@ -1,10 +1,8 @@
# TODO: Add relevant item data
# Item Importance:
# Item Importance:
# 1. Major - Item can potentially unlock locations. Will be placed in a non-excluded location
# 2. Minor - Item does not unlock locations, but has gameplay utility. Will be placed
# in a non-excluded location if any are empty.
# 3. Junk - Item is expendible. Will be placed completely randomly.
# 3. Junk - Item is expendable. Will be placed completely randomly.
#- Name: Recovery Heart
# Importance: Junk
@@ -806,7 +806,7 @@ Hyrule Castle Compass:
Mirror Chamber Portal:
Standard:
Text: Mirror Chamnber Portal
Text: Mirror Chamber Portal
Pretty:
Text: the {Mirror Chamber Portal}
Cryptic:
@@ -1970,88 +1970,65 @@ Midna Call As Wolf Three Choice:
Slingshot Shop Text Template:
Standard:
Text: |-
<Item Standard Name> <purple>30 Rupees<white>
I got this in for the kids. It's just a
toy, but it stings something AWFUL
when you get hit by it!
<Item Standard Name>: <purple>30 Rupees<white>
# I got this in for the kids. It's just a
# toy, but it stings something AWFUL
# when you get hit by it!
Slingshot Shop Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> is <purple>30 Rupees<white>.
If you want it, bring some money
with you, all right, m'dear?
<Item Pretty Name> is <purple>30 Rupees<white>. If you want it, bring some money with you, all right, m'dear?
Slingshot Shop Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> is <purple>30 Rupees<white>.
Do you want to buy it, m'dear?<begin choice>
<Item Pretty Name> is <purple>30 Rupees<white>. Do you want to buy it, m'dear?<begin choice>
Slingshot Shop After Purchase Text Template:
Standard:
Text: |-
What are you doing buying
<Item Pretty Name>, you naughty thing?
You're too old for toys! Will you at
least let the kids play with it?
What are you doing buying <Item Pretty Name>, you naughty thing? You're too old for toys! Will you at least let the kids play with it?
Barnes Special Offer Text Template:
Standard:
Text: |-
I've got a special offer goin' right
now: <Item Pretty Name>, just <purple>120
Rupees<white>! How 'bout that?<begin choice>
I've got a special offer goin' right now: <Item Pretty Name>, just <purple>120 Rupees<white>! How 'bout that?<begin choice>
Kakariko Malo Mart Wooden Shield Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>50
Rupees<white>. Want one or not?<begin choice>
<Item Pretty Name> will cost you <purple>50 Rupees<white>. Want one or not?<begin choice>
Kakariko Malo Mart Wooden Shield Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>50
Rupees<white>, but you can't afford it.
Don't expect a discount just
because we're from the same town.
<Item Pretty Name> will cost you <purple>50 Rupees<white>, but you can't afford it. Don't expect a discount just because we're from the same town.
Kakariko Malo Mart Hylian Shield Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>200
Rupees<white>. Want one or not?<begin choice>
<Item Pretty Name> will cost you <purple>200 Rupees<white>. Want one or not?<begin choice>
Kakariko Malo Mart Hylian Shield Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> will run you <purple>200
Rupees<white>...but if you have that much,
I'll eat my hat. And I don't even
HAVE a hat.
<Item Pretty Name> will run you <purple>200 Rupees<white>...but if you have that much, I'll eat my hat. And I don't even HAVE a hat.
Kakariko Malo Mart Hylian Shield After Purchase Text Template:
Standard:
Text: |-
Well, you bought my last
<Item Standard Name>...
so you'd better take good
care of it.
Well, you bought my last <Item Standard Name>... so you'd better take good care of it.
Kakariko Malo Mart Hawkeye Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> is <purple>100 Rupees<white>. You
want it or not?<begin choice>
<Item Pretty Name> is <purple>100 Rupees<white>. You want it or not?<begin choice>
Kakariko Malo Mart Hawkeye Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> costs <purple>100 Rupees<white>...
but there are people with enough
Rupees, and then there's you.
The guy with not enough.
<Item Pretty Name> costs <purple>100 Rupees<white>... but there are people with enough Rupees, and then there's you. The guy with not enough.
Kakariko Malo Mart Hawkeye After Purchase Text Template:
Standard:
@@ -2061,23 +2038,20 @@ Kakariko Malo Mart Hawkeye After Purchase Text Template:
Kakariko Malo Mart Red Potion Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>30
Rupees<white>, but I won't be donating
it to the poor, sorry.
<Item Pretty Name> will cost you <purple>30 Rupees<white>, but I won't be donating it to the poor, sorry.
Kakariko Malo Mart Red Potion Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>30
Rupees<white>. Want some or not?<begin choice>
<Item Pretty Name> will cost you <purple>30 Rupees<white>. Want some or not?<begin choice>
Kakariko Malo Mart Red Potion Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>30 Rupees<white>
This potion replenishes your
life energy. Keep it in an <red>empty
bottle<white>.
# This potion replenishes your
# life energy. Keep it in an <red>empty
# bottle<white>.
Kakariko Malo Mart Hawkeye Coming Soon Text Template:
Standard:
@@ -2088,9 +2062,9 @@ Kakariko Malo Mart Hawkeye Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>100 Rupees<white>
This eyewear allows you to see
distant objects as if with the eyes
of a hawk.
# This eyewear allows you to see
# distant objects as if with the eyes
# of a hawk.
Kakariko Malo Mart Sold Out Text:
Standard:
@@ -2099,24 +2073,24 @@ Kakariko Malo Mart Sold Out Text:
Kakariko Malo Mart Wooden Shield Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>50 Rupees
<white>This is a simple shield. It's made of
wood, so it will burn away if
touched by fire.
<Item Standard Name>: <purple>50 Rupees<white>
# This is a simple shield. It's made of
# wood, so it will burn away if
# touched by fire.
Kakariko Malo Mart Hylian Shield Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>200 Rupees
<white> LIMITED SUPPLY!
Don't let them sell out before you
buy one!
<Item Standard Name>: <purple>200 Rupees<white>
# LIMITED SUPPLY!
# Don't let them sell out before you
# buy one!
Chudleys Shop Magic Armor Text Template:
Standard:
Text: |-
<Item Standard Name>
Armor for the richest and most
Only for the richest and most
precious customers who value their
lives over their Rupees.
@@ -2129,9 +2103,9 @@ Castle Town Malo Mart Magic Armor Text Template:
Standard:
Text: |-
<Item Standard Name> <red>!Special! <purple>598 Rupees<white>
This is quite a bargain when you
think of how valuable your life is.
What's a few Rupees to stay alive?
# This is quite a bargain when you
# think of how valuable your life is.
# What's a few Rupees to stay alive?
Castle Town Malo Mart Magic Armor Sold Out Text Template:
Standard:
@@ -2157,38 +2131,31 @@ Coro Bottle Offer 1 Text Template:
Standard:
Text: |-
And check this out! I have a special,
one-time offer of <Item Pretty Name>
for only <purple>100 Rupees<white>!
How 'bout it, guy? What a bargain!<begin choice>
one-time offer of <Item Pretty Name> for only <purple>100 Rupees<white>! How 'bout it, guy? What a bargain!<begin choice>
Coro Bottle Offer 2 Text Template:
Standard:
Text: |-
I have a special, one-time offer of
<Item Pretty Name> for only
<purple>100 Rupees<white>. How 'bout it, guy?<begin choice>
<Item Pretty Name> for only <purple>100 Rupees<white>. How 'bout it, guy?<begin choice>
Coro Bottle Offer 3 Text Template:
Standard:
Text: |-
Right now we have a <purple>100-Rupee<white>
<Item Standard Name> and <purple>20-Rupee<white>
<red>refills<white> to choose from!<begin choice>
Right now we have a <purple>100-Rupee<white>
<Item Standard Name> and <purple>20-Rupee<white> <red>refills<white> to choose from!<begin choice>
Coro Bottle Offer 4 Text Template:
Standard:
Text: |-
And check this out! I have a special,
one-time offer of <Item Pretty Name>
for only <purple>100 Rupees<white>!
How 'bout it, guy? What a bargain!<begin choice>
one-time offer of <Item Pretty Name> for only <purple>100 Rupees<white>! How 'bout it, guy? What a bargain!<begin choice>
Fishing Hole Sign Text Template:
Standard:
Text: |-
<red> DON'T LITTER!
<white>Do NOT toss empty bottles or
<Item Pretty Name> here!
The fish are CRYING!
<Item Pretty Name> here! The fish are CRYING!
Keep the fishing hole clean!
@@ -806,7 +806,7 @@ Hyrule Castle Compass:
Mirror Chamber Portal:
Standard:
Text: Mirror Chamnber Portal
Text: Mirror Chamber Portal
Pretty:
Text: the {Mirror Chamber Portal}
Cryptic:
@@ -1970,88 +1970,65 @@ Midna Call As Wolf Three Choice:
Slingshot Shop Text Template:
Standard:
Text: |-
<Item Standard Name> <purple>30 Rupees<white>
I got this in for the kids. It's just a
toy, but it stings something AWFUL
when you get hit by it!
<Item Standard Name>: <purple>30 Rupees<white>
# I got this in for the kids. It's just a
# toy, but it stings something AWFUL
# when you get hit by it!
Slingshot Shop Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> is <purple>30 Rupees<white>.
If you want it, bring some money
with you, all right, m'dear?
<Item Pretty Name> is <purple>30 Rupees<white>. If you want it, bring some money with you, all right, m'dear?
Slingshot Shop Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> is <purple>30 Rupees<white>.
Do you want to buy it, m'dear?<begin choice>
<Item Pretty Name> is <purple>30 Rupees<white>. Do you want to buy it, m'dear?<begin choice>
Slingshot Shop After Purchase Text Template:
Standard:
Text: |-
What are you doing buying
<Item Pretty Name>, you naughty thing?
You're too old for toys! Will you at
least let the kids play with it?
What are you doing buying <Item Pretty Name>, you naughty thing? You're too old for toys! Will you at least let the kids play with it?
Barnes Special Offer Text Template:
Standard:
Text: |-
I've got a special offer goin' right
now: <Item Pretty Name>, just <purple>120
Rupees<white>! How 'bout that?<begin choice>
I've got a special offer goin' right now: <Item Pretty Name>, just <purple>120 Rupees<white>! How 'bout that?<begin choice>
Kakariko Malo Mart Wooden Shield Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>50
Rupees<white>. Want one or not?<begin choice>
<Item Pretty Name> will cost you <purple>50 Rupees<white>. Want one or not?<begin choice>
Kakariko Malo Mart Wooden Shield Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>50
Rupees<white>, but you can't afford it.
Don't expect a discount just
because we're from the same town.
<Item Pretty Name> will cost you <purple>50 Rupees<white>, but you can't afford it. Don't expect a discount just because we're from the same town.
Kakariko Malo Mart Hylian Shield Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>200
Rupees<white>. Want one or not?<begin choice>
<Item Pretty Name> will cost you <purple>200 Rupees<white>. Want one or not?<begin choice>
Kakariko Malo Mart Hylian Shield Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> will run you <purple>200
Rupees<white>...but if you have that much,
I'll eat my hat. And I don't even
HAVE a hat.
<Item Pretty Name> will run you <purple>200 Rupees<white>...but if you have that much, I'll eat my hat. And I don't even HAVE a hat.
Kakariko Malo Mart Hylian Shield After Purchase Text Template:
Standard:
Text: |-
Well, you bought my last
<Item Standard Name>...
so you'd better take good
care of it.
Well, you bought my last <Item Standard Name>... so you'd better take good care of it.
Kakariko Malo Mart Hawkeye Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> is <purple>100 Rupees<white>. You
want it or not?<begin choice>
<Item Pretty Name> is <purple>100 Rupees<white>. You want it or not?<begin choice>
Kakariko Malo Mart Hawkeye Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> costs <purple>100 Rupees<white>...
but there are people with enough
Rupees, and then there's you.
The guy with not enough.
<Item Pretty Name> costs <purple>100 Rupees<white>... but there are people with enough Rupees, and then there's you. The guy with not enough.
Kakariko Malo Mart Hawkeye After Purchase Text Template:
Standard:
@@ -2061,23 +2038,20 @@ Kakariko Malo Mart Hawkeye After Purchase Text Template:
Kakariko Malo Mart Red Potion Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>30
Rupees<white>, but I won't be donating
it to the poor, sorry.
<Item Pretty Name> will cost you <purple>30 Rupees<white>, but I won't be donating it to the poor, sorry.
Kakariko Malo Mart Red Potion Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>30
Rupees<white>. Want some or not?<begin choice>
<Item Pretty Name> will cost you <purple>30 Rupees<white>. Want some or not?<begin choice>
Kakariko Malo Mart Red Potion Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>30 Rupees<white>
This potion replenishes your
life energy. Keep it in an <red>empty
bottle<white>.
# This potion replenishes your
# life energy. Keep it in an <red>empty
# bottle<white>.
Kakariko Malo Mart Hawkeye Coming Soon Text Template:
Standard:
@@ -2088,9 +2062,9 @@ Kakariko Malo Mart Hawkeye Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>100 Rupees<white>
This eyewear allows you to see
distant objects as if with the eyes
of a hawk.
# This eyewear allows you to see
# distant objects as if with the eyes
# of a hawk.
Kakariko Malo Mart Sold Out Text:
Standard:
@@ -2099,24 +2073,24 @@ Kakariko Malo Mart Sold Out Text:
Kakariko Malo Mart Wooden Shield Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>50 Rupees
<white>This is a simple shield. It's made of
wood, so it will burn away if
touched by fire.
<Item Standard Name>: <purple>50 Rupees<white>
# This is a simple shield. It's made of
# wood, so it will burn away if
# touched by fire.
Kakariko Malo Mart Hylian Shield Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>200 Rupees
<white> LIMITED SUPPLY!
Don't let them sell out before you
buy one!
<Item Standard Name>: <purple>200 Rupees<white>
# LIMITED SUPPLY!
# Don't let them sell out before you
# buy one!
Chudleys Shop Magic Armor Text Template:
Standard:
Text: |-
<Item Standard Name>
Armor for the richest and most
Only for the richest and most
precious customers who value their
lives over their Rupees.
@@ -2129,9 +2103,9 @@ Castle Town Malo Mart Magic Armor Text Template:
Standard:
Text: |-
<Item Standard Name> <red>!Special! <purple>598 Rupees<white>
This is quite a bargain when you
think of how valuable your life is.
What's a few Rupees to stay alive?
# This is quite a bargain when you
# think of how valuable your life is.
# What's a few Rupees to stay alive?
Castle Town Malo Mart Magic Armor Sold Out Text Template:
Standard:
@@ -2153,43 +2127,35 @@ Charlo Donation Ask Text Template:
For <Item Pretty Name>...
Would you please make a donation?<begin choice>
Coro Bottle Offer 1 Text Template:
Standard:
Text: |-
And check this out! I have a special,
one-time offer of <Item Pretty Name>
for only <purple>100 Rupees<white>!
How 'bout it, guy? What a bargain!<begin choice>
one-time offer of <Item Pretty Name> for only <purple>100 Rupees<white>! How 'bout it, guy? What a bargain!<begin choice>
Coro Bottle Offer 2 Text Template:
Standard:
Text: |-
I have a special, one-time offer of
<Item Pretty Name> for only
<purple>100 Rupees<white>. How 'bout it, guy?<begin choice>
<Item Pretty Name> for only <purple>100 Rupees<white>. How 'bout it, guy?<begin choice>
Coro Bottle Offer 3 Text Template:
Standard:
Text: |-
Right now we have a <purple>100-Rupee<white>
<Item Standard Name> and <purple>20-Rupee<white>
<red>refills<white> to choose from!<begin choice>
Right now we have a <purple>100-Rupee<white>
<Item Standard Name> and <purple>20-Rupee<white> <red>refills<white> to choose from!<begin choice>
Coro Bottle Offer 4 Text Template:
Standard:
Text: |-
And check this out! I have a special,
one-time offer of <Item Pretty Name>
for only <purple>100 Rupees<white>!
How 'bout it, guy? What a bargain!<begin choice>
one-time offer of <Item Pretty Name> for only <purple>100 Rupees<white>! How 'bout it, guy? What a bargain!<begin choice>
Fishing Hole Sign Text Template:
Standard:
Text: |-
<red> DON'T LITTER!
<white>Do NOT toss empty bottles or
<Item Pretty Name> here!
The fish are CRYING!
<Item Pretty Name> here! The fish are CRYING!
Keep the fishing hole clean!
@@ -806,7 +806,7 @@ Hyrule Castle Compass:
Mirror Chamber Portal:
Standard:
Text: Mirror Chamnber Portal
Text: Mirror Chamber Portal
Pretty:
Text: the {Mirror Chamber Portal}
Cryptic:
@@ -1970,88 +1970,65 @@ Midna Call As Wolf Three Choice:
Slingshot Shop Text Template:
Standard:
Text: |-
<Item Standard Name> <purple>30 Rupees<white>
I got this in for the kids. It's just a
toy, but it stings something AWFUL
when you get hit by it!
<Item Standard Name>: <purple>30 Rupees<white>
# I got this in for the kids. It's just a
# toy, but it stings something AWFUL
# when you get hit by it!
Slingshot Shop Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> is <purple>30 Rupees<white>.
If you want it, bring some money
with you, all right, m'dear?
<Item Pretty Name> is <purple>30 Rupees<white>. If you want it, bring some money with you, all right, m'dear?
Slingshot Shop Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> is <purple>30 Rupees<white>.
Do you want to buy it, m'dear?<begin choice>
<Item Pretty Name> is <purple>30 Rupees<white>. Do you want to buy it, m'dear?<begin choice>
Slingshot Shop After Purchase Text Template:
Standard:
Text: |-
What are you doing buying
<Item Pretty Name>, you naughty thing?
You're too old for toys! Will you at
least let the kids play with it?
What are you doing buying <Item Pretty Name>, you naughty thing? You're too old for toys! Will you at least let the kids play with it?
Barnes Special Offer Text Template:
Standard:
Text: |-
I've got a special offer goin' right
now: <Item Pretty Name>, just <purple>120
Rupees<white>! How 'bout that?<begin choice>
I've got a special offer goin' right now: <Item Pretty Name>, just <purple>120 Rupees<white>! How 'bout that?<begin choice>
Kakariko Malo Mart Wooden Shield Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>50
Rupees<white>. Want one or not?<begin choice>
<Item Pretty Name> will cost you <purple>50 Rupees<white>. Want one or not?<begin choice>
Kakariko Malo Mart Wooden Shield Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>50
Rupees<white>, but you can't afford it.
Don't expect a discount just
because we're from the same town.
<Item Pretty Name> will cost you <purple>50 Rupees<white>, but you can't afford it. Don't expect a discount just because we're from the same town.
Kakariko Malo Mart Hylian Shield Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>200
Rupees<white>. Want one or not?<begin choice>
<Item Pretty Name> will cost you <purple>200 Rupees<white>. Want one or not?<begin choice>
Kakariko Malo Mart Hylian Shield Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> will run you <purple>200
Rupees<white>...but if you have that much,
I'll eat my hat. And I don't even
HAVE a hat.
<Item Pretty Name> will run you <purple>200 Rupees<white>...but if you have that much, I'll eat my hat. And I don't even HAVE a hat.
Kakariko Malo Mart Hylian Shield After Purchase Text Template:
Standard:
Text: |-
Well, you bought my last
<Item Standard Name>...
so you'd better take good
care of it.
Well, you bought my last <Item Standard Name>... so you'd better take good care of it.
Kakariko Malo Mart Hawkeye Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> is <purple>100 Rupees<white>. You
want it or not?<begin choice>
<Item Pretty Name> is <purple>100 Rupees<white>. You want it or not?<begin choice>
Kakariko Malo Mart Hawkeye Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> costs <purple>100 Rupees<white>...
but there are people with enough
Rupees, and then there's you.
The guy with not enough.
<Item Pretty Name> costs <purple>100 Rupees<white>... but there are people with enough Rupees, and then there's you. The guy with not enough.
Kakariko Malo Mart Hawkeye After Purchase Text Template:
Standard:
@@ -2061,23 +2038,20 @@ Kakariko Malo Mart Hawkeye After Purchase Text Template:
Kakariko Malo Mart Red Potion Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>30
Rupees<white>, but I won't be donating
it to the poor, sorry.
<Item Pretty Name> will cost you <purple>30 Rupees<white>, but I won't be donating it to the poor, sorry.
Kakariko Malo Mart Red Potion Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>30
Rupees<white>. Want some or not?<begin choice>
<Item Pretty Name> will cost you <purple>30 Rupees<white>. Want some or not?<begin choice>
Kakariko Malo Mart Red Potion Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>30 Rupees<white>
This potion replenishes your
life energy. Keep it in an <red>empty
bottle<white>.
# This potion replenishes your
# life energy. Keep it in an <red>empty
# bottle<white>.
Kakariko Malo Mart Hawkeye Coming Soon Text Template:
Standard:
@@ -2088,9 +2062,9 @@ Kakariko Malo Mart Hawkeye Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>100 Rupees<white>
This eyewear allows you to see
distant objects as if with the eyes
of a hawk.
# This eyewear allows you to see
# distant objects as if with the eyes
# of a hawk.
Kakariko Malo Mart Sold Out Text:
Standard:
@@ -2099,24 +2073,24 @@ Kakariko Malo Mart Sold Out Text:
Kakariko Malo Mart Wooden Shield Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>50 Rupees
<white>This is a simple shield. It's made of
wood, so it will burn away if
touched by fire.
<Item Standard Name>: <purple>50 Rupees<white>
# This is a simple shield. It's made of
# wood, so it will burn away if
# touched by fire.
Kakariko Malo Mart Hylian Shield Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>200 Rupees
<white> LIMITED SUPPLY!
Don't let them sell out before you
buy one!
<Item Standard Name>: <purple>200 Rupees<white>
# LIMITED SUPPLY!
# Don't let them sell out before you
# buy one!
Chudleys Shop Magic Armor Text Template:
Standard:
Text: |-
<Item Standard Name>
Armor for the richest and most
Only for the richest and most
precious customers who value their
lives over their Rupees.
@@ -2129,9 +2103,9 @@ Castle Town Malo Mart Magic Armor Text Template:
Standard:
Text: |-
<Item Standard Name> <red>!Special! <purple>598 Rupees<white>
This is quite a bargain when you
think of how valuable your life is.
What's a few Rupees to stay alive?
# This is quite a bargain when you
# think of how valuable your life is.
# What's a few Rupees to stay alive?
Castle Town Malo Mart Magic Armor Sold Out Text Template:
Standard:
@@ -2153,43 +2127,35 @@ Charlo Donation Ask Text Template:
For <Item Pretty Name>...
Would you please make a donation?<begin choice>
Coro Bottle Offer 1 Text Template:
Standard:
Text: |-
And check this out! I have a special,
one-time offer of <Item Pretty Name>
for only <purple>100 Rupees<white>!
How 'bout it, guy? What a bargain!<begin choice>
one-time offer of <Item Pretty Name> for only <purple>100 Rupees<white>! How 'bout it, guy? What a bargain!<begin choice>
Coro Bottle Offer 2 Text Template:
Standard:
Text: |-
I have a special, one-time offer of
<Item Pretty Name> for only
<purple>100 Rupees<white>. How 'bout it, guy?<begin choice>
<Item Pretty Name> for only <purple>100 Rupees<white>. How 'bout it, guy?<begin choice>
Coro Bottle Offer 3 Text Template:
Standard:
Text: |-
Right now we have a <purple>100-Rupee<white>
<Item Standard Name> and <purple>20-Rupee<white>
<red>refills<white> to choose from!<begin choice>
Right now we have a <purple>100-Rupee<white>
<Item Standard Name> and <purple>20-Rupee<white> <red>refills<white> to choose from!<begin choice>
Coro Bottle Offer 4 Text Template:
Standard:
Text: |-
And check this out! I have a special,
one-time offer of <Item Pretty Name>
for only <purple>100 Rupees<white>!
How 'bout it, guy? What a bargain!<begin choice>
one-time offer of <Item Pretty Name> for only <purple>100 Rupees<white>! How 'bout it, guy? What a bargain!<begin choice>
Fishing Hole Sign Text Template:
Standard:
Text: |-
<red> DON'T LITTER!
<white>Do NOT toss empty bottles or
<Item Pretty Name> here!
The fish are CRYING!
<Item Pretty Name> here! The fish are CRYING!
Keep the fishing hole clean!
@@ -806,7 +806,7 @@ Hyrule Castle Compass:
Mirror Chamber Portal:
Standard:
Text: Mirror Chamnber Portal
Text: Mirror Chamber Portal
Pretty:
Text: the {Mirror Chamber Portal}
Cryptic:
@@ -1970,88 +1970,65 @@ Midna Call As Wolf Three Choice:
Slingshot Shop Text Template:
Standard:
Text: |-
<Item Standard Name> <purple>30 Rupees<white>
I got this in for the kids. It's just a
toy, but it stings something AWFUL
when you get hit by it!
<Item Standard Name>: <purple>30 Rupees<white>
# I got this in for the kids. It's just a
# toy, but it stings something AWFUL
# when you get hit by it!
Slingshot Shop Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> is <purple>30 Rupees<white>.
If you want it, bring some money
with you, all right, m'dear?
<Item Pretty Name> is <purple>30 Rupees<white>. If you want it, bring some money with you, all right, m'dear?
Slingshot Shop Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> is <purple>30 Rupees<white>.
Do you want to buy it, m'dear?<begin choice>
<Item Pretty Name> is <purple>30 Rupees<white>. Do you want to buy it, m'dear?<begin choice>
Slingshot Shop After Purchase Text Template:
Standard:
Text: |-
What are you doing buying
<Item Pretty Name>, you naughty thing?
You're too old for toys! Will you at
least let the kids play with it?
What are you doing buying <Item Pretty Name>, you naughty thing? You're too old for toys! Will you at least let the kids play with it?
Barnes Special Offer Text Template:
Standard:
Text: |-
I've got a special offer goin' right
now: <Item Pretty Name>, just <purple>120
Rupees<white>! How 'bout that?<begin choice>
I've got a special offer goin' right now: <Item Pretty Name>, just <purple>120 Rupees<white>! How 'bout that?<begin choice>
Kakariko Malo Mart Wooden Shield Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>50
Rupees<white>. Want one or not?<begin choice>
<Item Pretty Name> will cost you <purple>50 Rupees<white>. Want one or not?<begin choice>
Kakariko Malo Mart Wooden Shield Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>50
Rupees<white>, but you can't afford it.
Don't expect a discount just
because we're from the same town.
<Item Pretty Name> will cost you <purple>50 Rupees<white>, but you can't afford it. Don't expect a discount just because we're from the same town.
Kakariko Malo Mart Hylian Shield Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>200
Rupees<white>. Want one or not?<begin choice>
<Item Pretty Name> will cost you <purple>200 Rupees<white>. Want one or not?<begin choice>
Kakariko Malo Mart Hylian Shield Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> will run you <purple>200
Rupees<white>...but if you have that much,
I'll eat my hat. And I don't even
HAVE a hat.
<Item Pretty Name> will run you <purple>200 Rupees<white>...but if you have that much, I'll eat my hat. And I don't even HAVE a hat.
Kakariko Malo Mart Hylian Shield After Purchase Text Template:
Standard:
Text: |-
Well, you bought my last
<Item Standard Name>...
so you'd better take good
care of it.
Well, you bought my last <Item Standard Name>... so you'd better take good care of it.
Kakariko Malo Mart Hawkeye Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> is <purple>100 Rupees<white>. You
want it or not?<begin choice>
<Item Pretty Name> is <purple>100 Rupees<white>. You want it or not?<begin choice>
Kakariko Malo Mart Hawkeye Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> costs <purple>100 Rupees<white>...
but there are people with enough
Rupees, and then there's you.
The guy with not enough.
<Item Pretty Name> costs <purple>100 Rupees<white>... but there are people with enough Rupees, and then there's you. The guy with not enough.
Kakariko Malo Mart Hawkeye After Purchase Text Template:
Standard:
@@ -2061,23 +2038,20 @@ Kakariko Malo Mart Hawkeye After Purchase Text Template:
Kakariko Malo Mart Red Potion Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>30
Rupees<white>, but I won't be donating
it to the poor, sorry.
<Item Pretty Name> will cost you <purple>30 Rupees<white>, but I won't be donating it to the poor, sorry.
Kakariko Malo Mart Red Potion Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>30
Rupees<white>. Want some or not?<begin choice>
<Item Pretty Name> will cost you <purple>30 Rupees<white>. Want some or not?<begin choice>
Kakariko Malo Mart Red Potion Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>30 Rupees<white>
This potion replenishes your
life energy. Keep it in an <red>empty
bottle<white>.
# This potion replenishes your
# life energy. Keep it in an <red>empty
# bottle<white>.
Kakariko Malo Mart Hawkeye Coming Soon Text Template:
Standard:
@@ -2088,9 +2062,9 @@ Kakariko Malo Mart Hawkeye Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>100 Rupees<white>
This eyewear allows you to see
distant objects as if with the eyes
of a hawk.
# This eyewear allows you to see
# distant objects as if with the eyes
# of a hawk.
Kakariko Malo Mart Sold Out Text:
Standard:
@@ -2099,24 +2073,24 @@ Kakariko Malo Mart Sold Out Text:
Kakariko Malo Mart Wooden Shield Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>50 Rupees
<white>This is a simple shield. It's made of
wood, so it will burn away if
touched by fire.
<Item Standard Name>: <purple>50 Rupees<white>
# This is a simple shield. It's made of
# wood, so it will burn away if
# touched by fire.
Kakariko Malo Mart Hylian Shield Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>200 Rupees
<white> LIMITED SUPPLY!
Don't let them sell out before you
buy one!
<Item Standard Name>: <purple>200 Rupees<white>
# LIMITED SUPPLY!
# Don't let them sell out before you
# buy one!
Chudleys Shop Magic Armor Text Template:
Standard:
Text: |-
<Item Standard Name>
Armor for the richest and most
Only for the richest and most
precious customers who value their
lives over their Rupees.
@@ -2129,9 +2103,9 @@ Castle Town Malo Mart Magic Armor Text Template:
Standard:
Text: |-
<Item Standard Name> <red>!Special! <purple>598 Rupees<white>
This is quite a bargain when you
think of how valuable your life is.
What's a few Rupees to stay alive?
# This is quite a bargain when you
# think of how valuable your life is.
# What's a few Rupees to stay alive?
Castle Town Malo Mart Magic Armor Sold Out Text Template:
Standard:
@@ -2153,43 +2127,35 @@ Charlo Donation Ask Text Template:
For <Item Pretty Name>...
Would you please make a donation?<begin choice>
Coro Bottle Offer 1 Text Template:
Standard:
Text: |-
And check this out! I have a special,
one-time offer of <Item Pretty Name>
for only <purple>100 Rupees<white>!
How 'bout it, guy? What a bargain!<begin choice>
one-time offer of <Item Pretty Name> for only <purple>100 Rupees<white>! How 'bout it, guy? What a bargain!<begin choice>
Coro Bottle Offer 2 Text Template:
Standard:
Text: |-
I have a special, one-time offer of
<Item Pretty Name> for only
<purple>100 Rupees<white>. How 'bout it, guy?<begin choice>
<Item Pretty Name> for only <purple>100 Rupees<white>. How 'bout it, guy?<begin choice>
Coro Bottle Offer 3 Text Template:
Standard:
Text: |-
Right now we have a <purple>100-Rupee<white>
<Item Standard Name> and <purple>20-Rupee<white>
<red>refills<white> to choose from!<begin choice>
Right now we have a <purple>100-Rupee<white>
<Item Standard Name> and <purple>20-Rupee<white> <red>refills<white> to choose from!<begin choice>
Coro Bottle Offer 4 Text Template:
Standard:
Text: |-
And check this out! I have a special,
one-time offer of <Item Pretty Name>
for only <purple>100 Rupees<white>!
How 'bout it, guy? What a bargain!<begin choice>
one-time offer of <Item Pretty Name> for only <purple>100 Rupees<white>! How 'bout it, guy? What a bargain!<begin choice>
Fishing Hole Sign Text Template:
Standard:
Text: |-
<red> DON'T LITTER!
<white>Do NOT toss empty bottles or
<Item Pretty Name> here!
The fish are CRYING!
<Item Pretty Name> here! The fish are CRYING!
Keep the fishing hole clean!
@@ -806,7 +806,7 @@ Hyrule Castle Compass:
Mirror Chamber Portal:
Standard:
Text: Mirror Chamnber Portal
Text: Mirror Chamber Portal
Pretty:
Text: the {Mirror Chamber Portal}
Cryptic:
@@ -1970,88 +1970,65 @@ Midna Call As Wolf Three Choice:
Slingshot Shop Text Template:
Standard:
Text: |-
<Item Standard Name> <purple>30 Rupees<white>
I got this in for the kids. It's just a
toy, but it stings something AWFUL
when you get hit by it!
<Item Standard Name>: <purple>30 Rupees<white>
# I got this in for the kids. It's just a
# toy, but it stings something AWFUL
# when you get hit by it!
Slingshot Shop Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> is <purple>30 Rupees<white>.
If you want it, bring some money
with you, all right, m'dear?
<Item Pretty Name> is <purple>30 Rupees<white>. If you want it, bring some money with you, all right, m'dear?
Slingshot Shop Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> is <purple>30 Rupees<white>.
Do you want to buy it, m'dear?<begin choice>
<Item Pretty Name> is <purple>30 Rupees<white>. Do you want to buy it, m'dear?<begin choice>
Slingshot Shop After Purchase Text Template:
Standard:
Text: |-
What are you doing buying
<Item Pretty Name>, you naughty thing?
You're too old for toys! Will you at
least let the kids play with it?
What are you doing buying <Item Pretty Name>, you naughty thing? You're too old for toys! Will you at least let the kids play with it?
Barnes Special Offer Text Template:
Standard:
Text: |-
I've got a special offer goin' right
now: <Item Pretty Name>, just <purple>120
Rupees<white>! How 'bout that?<begin choice>
I've got a special offer goin' right now: <Item Pretty Name>, just <purple>120 Rupees<white>! How 'bout that?<begin choice>
Kakariko Malo Mart Wooden Shield Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>50
Rupees<white>. Want one or not?<begin choice>
<Item Pretty Name> will cost you <purple>50 Rupees<white>. Want one or not?<begin choice>
Kakariko Malo Mart Wooden Shield Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>50
Rupees<white>, but you can't afford it.
Don't expect a discount just
because we're from the same town.
<Item Pretty Name> will cost you <purple>50 Rupees<white>, but you can't afford it. Don't expect a discount just because we're from the same town.
Kakariko Malo Mart Hylian Shield Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>200
Rupees<white>. Want one or not?<begin choice>
<Item Pretty Name> will cost you <purple>200 Rupees<white>. Want one or not?<begin choice>
Kakariko Malo Mart Hylian Shield Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> will run you <purple>200
Rupees<white>...but if you have that much,
I'll eat my hat. And I don't even
HAVE a hat.
<Item Pretty Name> will run you <purple>200 Rupees<white>...but if you have that much, I'll eat my hat. And I don't even HAVE a hat.
Kakariko Malo Mart Hylian Shield After Purchase Text Template:
Standard:
Text: |-
Well, you bought my last
<Item Standard Name>...
so you'd better take good
care of it.
Well, you bought my last <Item Standard Name>... so you'd better take good care of it.
Kakariko Malo Mart Hawkeye Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> is <purple>100 Rupees<white>. You
want it or not?<begin choice>
<Item Pretty Name> is <purple>100 Rupees<white>. You want it or not?<begin choice>
Kakariko Malo Mart Hawkeye Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> costs <purple>100 Rupees<white>...
but there are people with enough
Rupees, and then there's you.
The guy with not enough.
<Item Pretty Name> costs <purple>100 Rupees<white>... but there are people with enough Rupees, and then there's you. The guy with not enough.
Kakariko Malo Mart Hawkeye After Purchase Text Template:
Standard:
@@ -2061,23 +2038,20 @@ Kakariko Malo Mart Hawkeye After Purchase Text Template:
Kakariko Malo Mart Red Potion Too Expensive Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>30
Rupees<white>, but I won't be donating
it to the poor, sorry.
<Item Pretty Name> will cost you <purple>30 Rupees<white>, but I won't be donating it to the poor, sorry.
Kakariko Malo Mart Red Potion Purchase Confirmation Text Template:
Standard:
Text: |-
<Item Pretty Name> will cost you <purple>30
Rupees<white>. Want some or not?<begin choice>
<Item Pretty Name> will cost you <purple>30 Rupees<white>. Want some or not?<begin choice>
Kakariko Malo Mart Red Potion Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>30 Rupees<white>
This potion replenishes your
life energy. Keep it in an <red>empty
bottle<white>.
# This potion replenishes your
# life energy. Keep it in an <red>empty
# bottle<white>.
Kakariko Malo Mart Hawkeye Coming Soon Text Template:
Standard:
@@ -2088,9 +2062,9 @@ Kakariko Malo Mart Hawkeye Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>100 Rupees<white>
This eyewear allows you to see
distant objects as if with the eyes
of a hawk.
# This eyewear allows you to see
# distant objects as if with the eyes
# of a hawk.
Kakariko Malo Mart Sold Out Text:
Standard:
@@ -2099,24 +2073,24 @@ Kakariko Malo Mart Sold Out Text:
Kakariko Malo Mart Wooden Shield Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>50 Rupees
<white>This is a simple shield. It's made of
wood, so it will burn away if
touched by fire.
<Item Standard Name>: <purple>50 Rupees<white>
# This is a simple shield. It's made of
# wood, so it will burn away if
# touched by fire.
Kakariko Malo Mart Hylian Shield Text Template:
Standard:
Text: |-
<Item Standard Name>: <purple>200 Rupees
<white> LIMITED SUPPLY!
Don't let them sell out before you
buy one!
<Item Standard Name>: <purple>200 Rupees<white>
# LIMITED SUPPLY!
# Don't let them sell out before you
# buy one!
Chudleys Shop Magic Armor Text Template:
Standard:
Text: |-
<Item Standard Name>
Armor for the richest and most
Only for the richest and most
precious customers who value their
lives over their Rupees.
@@ -2129,9 +2103,9 @@ Castle Town Malo Mart Magic Armor Text Template:
Standard:
Text: |-
<Item Standard Name> <red>!Special! <purple>598 Rupees<white>
This is quite a bargain when you
think of how valuable your life is.
What's a few Rupees to stay alive?
# This is quite a bargain when you
# think of how valuable your life is.
# What's a few Rupees to stay alive?
Castle Town Malo Mart Magic Armor Sold Out Text Template:
Standard:
@@ -2153,43 +2127,35 @@ Charlo Donation Ask Text Template:
For <Item Pretty Name>...
Would you please make a donation?<begin choice>
Coro Bottle Offer 1 Text Template:
Standard:
Text: |-
And check this out! I have a special,
one-time offer of <Item Pretty Name>
for only <purple>100 Rupees<white>!
How 'bout it, guy? What a bargain!<begin choice>
one-time offer of <Item Pretty Name> for only <purple>100 Rupees<white>! How 'bout it, guy? What a bargain!<begin choice>
Coro Bottle Offer 2 Text Template:
Standard:
Text: |-
I have a special, one-time offer of
<Item Pretty Name> for only
<purple>100 Rupees<white>. How 'bout it, guy?<begin choice>
<Item Pretty Name> for only <purple>100 Rupees<white>. How 'bout it, guy?<begin choice>
Coro Bottle Offer 3 Text Template:
Standard:
Text: |-
Right now we have a <purple>100-Rupee<white>
<Item Standard Name> and <purple>20-Rupee<white>
<red>refills<white> to choose from!<begin choice>
Right now we have a <purple>100-Rupee<white>
<Item Standard Name> and <purple>20-Rupee<white> <red>refills<white> to choose from!<begin choice>
Coro Bottle Offer 4 Text Template:
Standard:
Text: |-
And check this out! I have a special,
one-time offer of <Item Pretty Name>
for only <purple>100 Rupees<white>!
How 'bout it, guy? What a bargain!<begin choice>
one-time offer of <Item Pretty Name> for only <purple>100 Rupees<white>! How 'bout it, guy? What a bargain!<begin choice>
Fishing Hole Sign Text Template:
Standard:
Text: |-
<red> DON'T LITTER!
<white>Do NOT toss empty bottles or
<Item Pretty Name> here!
The fish are CRYING!
<Item Pretty Name> here! The fish are CRYING!
Keep the fishing hole clean!
@@ -45,6 +45,8 @@ namespace randomizer::logic::hints {
text = getTextObject(textName + " Template");
text.Replace("<Item Standard Name>", itemStandardName);
text.Replace("<Item Pretty Name>", itemPrettyName);
text.Capitalize();
text.BreakLines();
}
}
+115 -172
View File
@@ -9,154 +9,6 @@
namespace randomizer {
// std::array<std::string, 3> supported_languages = {"English", "Spanish", "French"};
//
// static std::unordered_map<Text::Color, std::u16string> nameToColor = {
// {Text::Color::NONE, TEXT_COLOR_DEFAULT},
// {Text::Color::RED, TEXT_COLOR_RED},
// {Text::Color::GREEN, TEXT_COLOR_GREEN},
// {Text::Color::BLUE, TEXT_COLOR_BLUE},
// {Text::Color::YELLOW, TEXT_COLOR_YELLOW},
// {Text::Color::CYAN, TEXT_COLOR_CYAN},
// {Text::Color::MAGENTA, TEXT_COLOR_MAGENTA},
// {Text::Color::GRAY, TEXT_COLOR_GRAY},
// {Text::Color::ORANGE, TEXT_COLOR_ORANGE},
// };
//
// std::u16string apply_name_color(std::u16string str, const Color& color)
// {
// // Return the raw text (bars included)
// if (color == Color::RAW)
// {
// return str;
// }
// // If there are no '|'s then just return with the color surrounding the whole string
// if (str.find('|') == std::string::npos)
// {
// auto textColor = nameToColor[color];
// return textColor + str + TEXT_COLOR_DEFAULT;
// }
//
// // Alternate between the text color and default incase there are multiple
// // pairs of bars
// auto textColor = nameToColor[color];
// bool insertColor = false;
// for (size_t pos = 0; pos < str.length(); pos++)
// {
// if (str[pos] == '|')
// {
// insertColor = !insertColor;
// str.erase(pos, 1);
// str.insert(pos, insertColor ? textColor : TEXT_COLOR_DEFAULT);
// }
// }
//
// return str;
// }
//
// std::u16string word_wrap_string(const std::u16string& string, const size_t& max_line_len) {
// size_t index_in_str = 0;
// std::u16string wordwrapped_str;
// std::u16string current_word;
// size_t curr_word_len = 0;
// size_t len_curr_line = 0;
//
// while (index_in_str < string.length()) { //length is weird because its utf-16
// char16_t character = string[index_in_str];
//
// if (character == u'\x0E') { //need to parse the commands, only implementing a few necessary ones for now (will break with other commands)
// std::u16string substr;
// size_t code_len = 0;
// if (string[index_in_str + 1] == u'\x00') {
// if (string[index_in_str + 2] == u'\x03') { //color command
// if (string[index_in_str + 4] == u'\xFFFF') { //text color white, weird length
// code_len = 10;
// }
// else {
// code_len = 5;
// }
// }
// }
// else if (string[index_in_str + 1] == u'\x01') { //all implemented commands in this group have length 4
// code_len = 4;
// }
// else if (string[index_in_str + 1] == u'\x02') { //all implemented commands in this group have length 4
// code_len = 4;
// }
// else if (string[index_in_str + 1] == u'\x03') { //all implemented commands in this group have length 4
// code_len = 4;
// }
// else if (string[index_in_str + 1] == u'\x04') { //all implemented commands in this group have length 4. Only used for Ho Ho sound
// code_len = 4;
// }
//
// substr = string.substr(index_in_str, code_len);
// current_word += substr;
// index_in_str += code_len;
// }
// else if (character == u'\n') {
// wordwrapped_str += current_word;
// wordwrapped_str += character;
// len_curr_line = 0;
// current_word = u"";
// curr_word_len = 0;
// index_in_str += 1;
// }
// else if (character == u' ') {
// wordwrapped_str += current_word;
// wordwrapped_str += character;
// len_curr_line += curr_word_len + 1;
// current_word = u"";
// curr_word_len = 0;
// index_in_str += 1;
// }
// else {
// current_word += character;
// curr_word_len += 1;
// index_in_str += 1;
//
// if (len_curr_line + curr_word_len > max_line_len) {
// wordwrapped_str += u'\n';
// len_curr_line = 0;
//
// if (curr_word_len > max_line_len) {
// wordwrapped_str += current_word + u'\n';
// current_word = u"";
// }
// }
// }
// }
// wordwrapped_str += current_word;
//
// return wordwrapped_str;
// }
//
// std::string pad_str_4_lines(const std::string& string)
// {
// std::vector<std::string> lines = randomizer::utility::str::Split(string, '\n');
//
// unsigned int padding_lines_needed = (4 - lines.size() % 4) % 4;
// for (unsigned int i = 0; i < padding_lines_needed; i++)
// {
// lines.push_back("");
// }
//
// return randomizer::utility::str::Merge(lines, '\n');
// }
//
// std::u16string pad_str_4_lines(const std::u16string& string)
// {
// std::vector<std::u16string> lines = randomizer::utility::str::Split(string, u'\n');
//
// unsigned int padding_lines_needed = (4 - lines.size() % 4) % 4;
// for (unsigned int i = 0; i < padding_lines_needed; i++)
// {
// lines.push_back(u"");
// }
//
// return randomizer::utility::str::erge(lines, u'\n');
// }
Text::Text(const std::string& str) {
for (auto& text : mText) {
text = str;
@@ -185,6 +37,38 @@ namespace randomizer {
}
}
void Text::Capitalize() {
try {
// Determine the platform-specific locale string
#if defined(_WIN32) || defined(_WIN64)
const char* localeName = "English_United States.1252";
#else
const char* localeName = "en_US.iso88591";
#endif
static const std::locale latin1Locale(localeName);
for (auto& text : mText) {
if (!text.empty()) {
text[0] = std::toupper(text[0], latin1Locale);
}
}
} catch (const std::runtime_error&) {
// Fallback incase the system completely lacks the requested locale definition
for (auto& text : mText) {
if (!text.empty()) {
text[0] = static_cast<char>(std::toupper(static_cast<unsigned char>(text[0])));
}
}
}
}
void Text::BreakLines(int maxLineWidth /*= MAX_LINE_WIDTH*/) {
for (auto& text : mText) {
breakLines(text, maxLineWidth);
}
}
bool Text::Empty() const {
for (auto& text : mText) {
if (!text.empty()) {
@@ -289,7 +173,7 @@ namespace randomizer {
return strToGender.at(str);
}
return Text::Gender::NUETRAL;
return Text::Gender::NEUTRAL;
}
Text::Plurality stringToPlurality(const std::string& str)
@@ -444,30 +328,89 @@ namespace randomizer {
return text;
}
void applyMessageCodes(std::string& str) {
using namespace std::string_literals;
const static std::unordered_map<std::string, std::string> messageCodes = {
{"<fast>", "\x1A\x05\x00\x00\x01"s},
{"<slow>", "\x1A\x05\x00\x00\x02"s},
{"<begin choice>", "\x1A\x05\x00\x00\x20"s},
{"<male>", "\x1A\x05\x06\x00\x02"s},
{"<female>", "\x1A\x05\x06\x00\x03"s},
{"<choice 1>", "\x1A\x06\x00\x00\x09\x01"s},
{"<choice 2>", "\x1A\x06\x00\x00\x09\x02"s},
{"<choice 3>", "\x1A\x06\x00\x00\x09\x03"s},
{"<white>", "\x1A\x06\xFF\x00\x00\x00"s},
{"<red>", "\x1A\x06\xFF\x00\x00\x01"s},
{"<green>", "\x1A\x06\xFF\x00\x00\x02"s},
{"<light blue>", "\x1A\x06\xFF\x00\x00\x03"s},
{"<yellow>", "\x1A\x06\xFF\x00\x00\x04"s},
{"<purple>", "\x1A\x06\xFF\x00\x00\x06"s},
{"<orange>", "\x1A\x06\xFF\x00\x00\x08"s},
// custom colors
{"<dark green>", "\x1A\x06\xFF\x00\x00\x09"s},
{"<blue>", "\x1A\x06\xFF\x00\x00\x0A"s},
{"<silver>", "\x1A\x06\xFF\x00\x00\x0B"s},
};
using namespace std::string_view_literals;
static const std::unordered_map<std::string_view, std::string_view> messageCodes = {
{"<fast>", "\x1A\x05\x00\x00\x01"sv},
{"<slow>", "\x1A\x05\x00\x00\x02"sv},
{"<begin choice>", "\x1A\x05\x00\x00\x20"sv},
{"<male>", "\x1A\x05\x06\x00\x02"sv},
{"<female>", "\x1A\x05\x06\x00\x03"sv},
{"<choice 1>", "\x1A\x06\x00\x00\x09\x01"sv},
{"<choice 2>", "\x1A\x06\x00\x00\x09\x02"sv},
{"<choice 3>", "\x1A\x06\x00\x00\x09\x03"sv},
{"<white>", "\x1A\x06\xFF\x00\x00\x00"sv},
{"<red>", "\x1A\x06\xFF\x00\x00\x01"sv},
{"<green>", "\x1A\x06\xFF\x00\x00\x02"sv},
{"<light blue>", "\x1A\x06\xFF\x00\x00\x03"sv},
{"<yellow>", "\x1A\x06\xFF\x00\x00\x04"sv},
{"<purple>", "\x1A\x06\xFF\x00\x00\x06"sv},
{"<orange>", "\x1A\x06\xFF\x00\x00\x08"sv},
// custom colors
{"<dark green>", "\x1A\x06\xFF\x00\x00\x09"sv},
{"<blue>", "\x1A\x06\xFF\x00\x00\x0A"sv},
{"<silver>", "\x1A\x06\xFF\x00\x00\x0B"sv},
};
void breakLines(std::string& str, int maxLineWidth) {
// Get game's font
auto gameFont = mDoExt_getMesgFont();
int curLineWidth = 0;
size_t i = 0;
size_t previousSpace = 0;
while (i < str.length()) {
// Skip over control codes since they don't get displayed
std::string code{};
for (const auto& [messageCode, replacement] : messageCodes) {
if (str.substr(i, messageCode.length()) == messageCode) {
code = messageCode;
break;
}
}
if (!code.empty()) {
// Assume worst case for player name width.
// 8 chars max * max char width
if (code == "<player_name>") {
curLineWidth += 8 * 21;
}
i += code.length();
continue;
}
// Keep track of the previous space to replace with
// a line break when we reach the maximum width
if (str[i] == ' ') {
previousSpace = i;
}
// If we encounter an already inserted newline, reset the counter
else if (str[i] == '\n') {
curLineWidth = 0;
++i;
continue;
}
JUTFont::TWidth width{};
gameFont->getWidthEntry(str[i], &width);
curLineWidth += /*width.field_0x0 + */width.field_0x1;
// If we exceed the maximum line width, replace the
// previous space with a newline and start counting
// from the newline again
if (curLineWidth > maxLineWidth) {
str[previousSpace] = '\n';
i = previousSpace;
curLineWidth = 0;
}
++i;
}
// Free game's font
mDoExt_removeMesgFont();
}
void applyMessageCodes(std::string& str) {
for (const auto& [code, replacement] : messageCodes) {
size_t pos = 0;
while ((pos = str.find(code, pos)) != std::string::npos) {
@@ -44,7 +44,7 @@ namespace randomizer {
enum Gender
{
NUETRAL = 0,
NEUTRAL = 0,
MASCULINE,
FEMININE,
GENDER_MAX,
@@ -57,6 +57,8 @@ namespace randomizer {
PLURALITY_MAX,
};
static constexpr size_t MAX_LINE_WIDTH = 441;
Text() = default;
explicit Text(const std::string& str);
@@ -72,6 +74,8 @@ namespace randomizer {
*/
void Replace(const std::string& oldStr, const Text& replacementText, int count = 1);
void Replace(const std::string& oldStr, const std::string& replacementText, int count = 1);
void BreakLines(int maxLineWidth = MAX_LINE_WIDTH);
void Capitalize();
bool Empty() const;
Text& operator+=(const Text& rhs);
Text& operator+=(const std::string& rhs);
@@ -110,6 +114,9 @@ namespace randomizer {
Text addColor(const Text& text, Text::Color color, int count = 1, bool forceAround = false);
// Adds newlines in appropriate places to properly break the text string for textboxes
void breakLines(std::string& str, int maxLineWidth);
// Replaces the message codes in the string with the ingame hex equivalents
void applyMessageCodes(std::string&);
}; // namespace Text