Game
Idle Task
6 years ago

Dynamic Sentence Generation


so i’m making a sentence generator…. it basically has a main sentence that can be something like “$player decides to take a short rest” where $player will be replaced with the player name….. i can also do “$player $rests” and while $player and $enemy refer to player and enemy names…. $rest needs to be in the MadLib list…. which can provide as many random options to replace $rest with as you want….. so here’s an even cooler trick i think i might be able to do…. have the $rest replace entry include something like “takes a $time break” and then have $time be an entry that comes after $rest in the MadLib list…. that way i can have a branching pattern…..

i might make it run through the MadLib list and whatnot till there’s no $ in the sentence… that way you wouldn’t have to ensure that the replacements cascade in order to work…. and i’ll probably want to setup a custom editor script that ensures that any $replacement you add to a sentence or MadLib option has a MadLib option…. (or at least exists as a variable replacement….. which for the standard sentences is just the name of the player or enemy…. but sentences where you get an item will need to be able to say the item’s name…. or if you’re doing combat it will need to say the name of the attack you do, if it hit, and how much damage it did…)

5d09be83513bc.png

also sentences have an action point cost…. which is how the system decides if a sentence can be used….. different sentence types can have additional requirements…. like any combat sentence will require that the InCombat variable be true…. which doesn’t exist…. and might also be a standard condition to check against…. with some sentences being unavailable during combat…. i could also just have the script that’s picking the sentence use a combat list, noncombat list, and maybe a healing list…. so i can give the avatar a bit of self preservation during combat.

5d09be840ea36.png

i might also have it do something to avoid repeating the same sentences too frequently.



0 comments

Loading...

Next up

Fun with dynamic sentences

Successful landing

#screenshotsaturday

What do you think guys in my robot?Just a beginner in 3d modeling..

My instagram https://www.instagram.com/rojhonbb/

"Our work is never over" they said.

Werehog transformation process. #sonicunleashed

An infected room from the second part of Cybel ! Are you up for some cleansing?

Szayel Aporro Granz - Bleach

New Teasers!

Hello my space friends! Now I added a space background to the ship. I love that space look but I still feel like stuff is missing. The lighting on the ship needs some improvements I think. Please tell me your opinion!