Bit of help with Boris


Questions, Explanations, Howtos

Tomb Titivator

Posts: 799

Joined: Saturday, 23rd February 2013, 22:25

Post Tuesday, 8th April 2014, 16:48

Bit of help with Boris

Kay, I'm working on making a patch where if you kill boris enough he'll stay dead. The problem is, I'm not sure where to initialize the variable for how many times he can reappear before he stays dead. I can't put it in monster_die because it'll get reset every time that function gets called, but I'm not sure where else I could put it. (This part of the code is a bit beyond me.)

Tomb Titivator

Posts: 832

Joined: Wednesday, 17th April 2013, 13:28

Post Tuesday, 8th April 2014, 17:04

Re: Bit of help with Boris

Well if you look at the Natasha code, it looks like similar info is stored in a mons->props? Maybe you could abuse the same field.

Tomb Titivator

Posts: 799

Joined: Saturday, 23rd February 2013, 22:25

Post Tuesday, 8th April 2014, 17:10

Re: Bit of help with Boris

I tried doing that, but I've never seen a variable assigned or accessed via -> before. I haven't the faintest idea as to what it does, and my google-fu is weak.

Tomb Titivator

Posts: 832

Joined: Wednesday, 17th April 2013, 13:28

Post Tuesday, 8th April 2014, 17:52

Re: Bit of help with Boris

Oh.

That just means mons is a pointer to a class, and props is a member of mons. These two are equivalent:

  Code:
mons->props
*mons.props


This page might be of interest:
http://www.tutorialspoint.com/cplusplus ... _class.htm

Tomb Titivator

Posts: 799

Joined: Saturday, 23rd February 2013, 22:25

Post Tuesday, 8th April 2014, 17:59

Re: Bit of help with Boris

Thanks. I mostly code in java and python, although out of those I prefer python.

Halls Hopper

Posts: 69

Joined: Monday, 20th February 2012, 10:43

Post Tuesday, 8th April 2014, 18:05

Re: Bit of help with Boris

khalil wrote:Thanks. I mostly code in java and python, although out of those I prefer python.


They you miss all the pleasure (andfor most pain) to play with the memory :p

Blades Runner

Posts: 552

Joined: Tuesday, 10th April 2012, 21:11

Post Tuesday, 8th April 2014, 18:40

Re: Bit of help with Boris

Why do you hate Boris? What did he ever do to you?

Tomb Titivator

Posts: 799

Joined: Saturday, 23rd February 2013, 22:25

Post Tuesday, 8th April 2014, 18:47

Re: Bit of help with Boris

The idea is that if he can be killed permanently with enough effort and follows the player from level to level if not permakilled, than there'll actually be a reason to kill Boris.
User avatar

Dungeon Master

Posts: 762

Joined: Thursday, 25th April 2013, 02:43

Post Tuesday, 8th April 2014, 19:41

Re: Bit of help with Boris

I'd probably make this a softer cap. If Boris is killed than his chance of reappearing should drop, but it should never actually reach 0. Of course, this would require making Boris reappear when you run away from him first.
On IRC my nick is reaverb. I play online under the name reaver, though.

Tomb Titivator

Posts: 799

Joined: Saturday, 23rd February 2013, 22:25

Post Tuesday, 8th April 2014, 19:47

Re: Bit of help with Boris

I'm working on the running away bit, but changing his chances of appearing after being killed would require somehow changing the weighting of his vault.
User avatar

Dungeon Master

Posts: 762

Joined: Thursday, 25th April 2013, 02:43

Post Tuesday, 8th April 2014, 20:53

Re: Bit of help with Boris

khalil wrote:I'm working on the running away bit, but changing his chances of appearing after being killed would require somehow changing the weighting of his vault.
Which would be trivial with lua.
On IRC my nick is reaverb. I play online under the name reaver, though.

Tomb Titivator

Posts: 799

Joined: Saturday, 23rd February 2013, 22:25

Post Tuesday, 8th April 2014, 21:15

Re: Bit of help with Boris

@reaver
I also feel a hard cap would be easier to balance. He shows up the average number of time he currently shows up (assuming you kill him every time you see him) and then he's dead forever.
And the fact that I know nothing about lua has nothing to do with that fact.
User avatar

Dungeon Master

Posts: 762

Joined: Thursday, 25th April 2013, 02:43

Post Wednesday, 9th April 2014, 03:35

Re: Bit of help with Boris

khalil wrote:I also feel a hard cap would be easier to balance. He shows up the average number of time he currently shows up (assuming you kill him every time you see him) and then he's dead forever.
And the fact that I know nothing about lua has nothing to do with that fact.
It's also a lot easier to see tic tac toe is balanced than to see that Chess or StarCraft is balanced (or unbalanced). If you can say with completely certainty that something is "balanced" then it's probably too shallow for any serious play. (Also: hard cap == spoiler)

If you only care about Boris appear on average the same number of times as now, that can easily be calculated too. (Using series IIRC?)

Seriously, I'll contribute the code and the numbers to make the cap soft if you put in the persistent variable, decide how often you want Boris to appear and convince the dev team this is a good idea (because it is, as I said, trivial)
On IRC my nick is reaverb. I play online under the name reaver, though.

Tomb Titivator

Posts: 853

Joined: Thursday, 29th August 2013, 18:39

Post Monday, 23rd June 2014, 17:33

Re: Bit of help with Boris

DracheReborn wrote:Oh.

That just means mons is a pointer to a class, and props is a member of mons. These two are equivalent:
  Code:
mons->props
*mons.props
It's even worse than that. If you don't use the arrow, the syntax is even more awkward. The . binds tighter than the *, so the bottom statement parses as:
  Code:
 *(mons.props)
This will fail if mons is a pointer, since it doesn't have any members. So, if you want to avoid the arrow, you'd have to make the order of operations explicit like this:
  Code:
(*mons).props
This is much uglier than just using the arrow.

For this message the author johlstei has received thanks:
DracheReborn

Return to Coding

Who is online

Users browsing this forum: No registered users and 4 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.