Game
Idle Task
7 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

Heya there! I really wanted to show you all a little gameplay preview of the first boss fight i'm currently working on i hope you like it ^^

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

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

Family band complete!

Call it 'wrong turn'!🚫 The feeling of running into a house with only one exit🚪, and being doomed to die. #pixelart #pixelartist #pixelartwork #art #pixel #indiegame #IndieGameDev #indieartist

Levels' maps.

Made my first ever animation.

OK, this starts to be too tricky puzzle already :D

#platformer #indiegame #puzzle

Out of boredom and curiosity, I coded Sailor Jupiter's Argentine Backbreaker.

blender animation experimentation, getting the hang of things fast. arms, rig, & gun models by me ofc