Patrefans
OniArtist from patreon
OniArtist patreon

Rogue-Like Update 07/16/2019 (How to write Rogue-Like)

🕑 Added 2019-07-16 23:26:51 +0000 UTC

Comments

Oni

I always try to balance things out, I might do one major systems pass to make things simpler, but I always try to add at least a few brand new features as well. I have some vague goals for the next version, but while it will be a "broad but shallow" expansion, it will be more than just background stuff, it will be intended to have noticeable improvements to a lot of existing elements, and new features, just not an entirely new character yet.

Patrick Thrasher

Lol, next update: nothing. Just streamlined all the code on the back end to provide more output in the future. :p I hate editing and redoing things, so I can relate if that never happens.

Krade Evvor

Lol, gamedev diary). Cool for diversity).

Oni

I don't like classes. They don't make as much sense to me. This is definitely a "me" problem, and maybe eventually I'll get better at understanding how they work, but for the time being I prefer keeping things straightforward.

pan

I'm not super familiar with renpy, but I do know python very well. Is there a reason why you don't use classes? if Chr == "Rogue": #sets the data based on Rogue's data if Type == "X": #"X" is just used for Lust, if R_Lust >= T: #since there are less variables here, it just quick-returns return 1 else: return 0 L = R_Love O = R_Obed I = R_Inbt elif Chr == "Kitty": # etc Seems like it could all get simplified if you had some kind of base class for a character: class XGirl: def __init__(self, love, inbt, obed): self.love = love self.inbt = inbt self.obed = obed # etc Then you wouldn't need such complex logic to decode "do I want R_Love, or E_Love, or K_Love, or L_Love, or ProfX_Love" you could just get Chr.Love It's a bit hard to discuss in-depth in a tiny comment window, I'm happy to discuss further in PMs if you'd like

Sweet thanks for explaining it! I'm going to mess around with the code right now

Oni

Ok, that's not *too* complicated, but this is code-code stuff, so anyone reading this that just wants to be casually writing scenes, you won't need to know all of this. My current approval function was built up a bit over time and is about 150 lines, but here's the simplified version of it. First rule, it needs to be a "def," not a label, because otherwise you can't just slap it in the middle of a condition. That means it needs to be in one of those "init python" blocks, and so it won't have the $s. def ApprovalCheck(Chr = "Rogue", T = 1000, Type = "LOI", Bonus = 0, Check=0): # $ Count = ApprovalCheck("Rogue",125) # T is the value being checked against, Type is the LOI condition in play, Bonus is a random bonus applied, and Loc is the girl's location if Chr == "Rogue": #sets the data based on Rogue's data if Type == "X": #"X" is just used for Lust, if R_Lust >= T: #since there are less variables here, it just quick-returns return 1 else: return 0 L = R_Love O = R_Obed I = R_Inbt elif Chr == "Kitty": #etc. . . covers the other girls, same as with Rogue if Type == "LOI": LocalTaboo = Taboo * 10 elif Type == "LO": #40 -> 240 #culls unwanted parameters. I = 0 LocalTaboo = Taboo * 6 elif Type == "OI": L = 0 LocalTaboo = Taboo * 6 elif Type == "LI": O = 0 LocalTaboo = Taboo * 6 elif Type == "L": #40 -> 120 O = 0 I = 0 LocalTaboo = Taboo * 3 elif Type == "O": L = 0 I = 0 LocalTaboo = Taboo * 3 elif Type == "I": O = 0 L = 0 LocalTaboo = Taboo * 3 else: LocalTaboo = Taboo * 10 #40 -> 400 if Check: #this returns the actual value of the tested stat. Check = (L + O + I + Bonus - LocalTaboo) return Check if (L + O + I + Bonus - LocalTaboo) >= T: #She passes and loves it return 1 else: return 0 Ok, that's the end of it. So I removed some chunks of it that wouldn't be needed for a simple check, but basically it means that it establishes the base values in the first bit, then it determines which values you're testing against in the second bit, then if you wanted to just spit out what the result is (useful for comparing two values, but not really necessary without the extra stuff I cut out here), but finally it just adds everything up, and if it's higher than the check value, then it returns a 1, which makes that if condition true, otherwise it returns a 0, which makes that conditional "not true." So basically, if I did "if ApprovalCheck("Rogue",1250,"LI"):" then it would take in Rogue's stats, then it would zero out "O", her temporary obedience value, because in this test we're only testing her "L" and "I" values in this one. Make sure you're using temporary variables here because you don't want to accidentally overwrite her actual stats. Then in the next bit, it adds those up, subtracts the Taboo value (which is used for public stuff), checked it against 1250, and so basically if her Love and Inhibition stats add up to more than 1250, the condition passes.

I've been learning renpy for a month or so, I've got all the basics down. But how do you implement the approval rating system? That could be really helpful with what I'm working on.

Ai Muhao

This is all true. It's fairly easy to come up with scenes, and I seriously wish I just had time to sit down and work on scenes in more detail. And stop being so intimidated by all the lines.

Oni

I hope to have some more to come building on it.

Really love the behind the scenes insight here. I'm looking forward to working with Renpy in the future, so I really appreciate this!

Ok! This is epic!

Nineonewon

Just gotta say this is a really cool post for someone like yourself to do. Thanks!


More Creators