Closed Nireya closed 2 years ago
what is this one actually doing? could use a little more info on the purpose of these PR's
where does this leave carnivorous crawler? also the math.random, the original seemed to be saying a range of 0-2 and a requirement of 1 which is 33% but this revision seems to basically be the same thing but a different range. not sure why.
ideally these things would be categorized with better detail rather than just 'misc' so we can keep track of the intention of the changes but they do seem relatively minor.. just odd
where does this leave carnivorous crawler? also the math.random, the original seemed to be saying a range of 0-2 and a requirement of 1 which is 33% but this revision seems to basically be the same thing but a different range. not sure why.
Carnivorous Crawler was the previous name of the mob on an older client, they're the correct level on this one. I based the down-scaling mob module off of an old SQL I had wrote for a previous server and updated it for here, without realizing some of the mobs have different names on this codebase as opposed to Topaz.
Wall of text incoming regarding Argus module change:
For whatever reason math.random(2)
is only returning 1 every time on my test server, making Argus spawn indefinitely (I also found an NPC in windy that uses math.random(2)
to determine what text she responds with, and again it only ever returned 1.
The furthest I got in debugging was looking at xirand.h
and thinking that the code all made sense, it should create a random range between 0 (the default min used when only a max is passed in), and 2 non-inclusive [0,2) meaning that it uses max-1 for calcs, thus returning either 0 or 1. Why that isn't working I'm not sure yet. I decided to just create a range with a defined min and max of 1,3 which properly randomizes on my test server between 1 and 2, which still lets the Argus/Leech King spawn code work because its a simple if random == 1 and else (doesn't care what the else is)
This is kind of a temp fix one off for this so Argus doesn't endlessly spawn each window, and there might be more cases of math.random
returning a fixed value in other places (i.e. random useless NPC in windy).
Edit: After Further testing seems math.random(0,2)
works so I updated this again, it was just the math.random(2)
that does not.
ideally these things would be categorized with better detail rather than just 'misc' so we can keep track of the intention of the changes but they do seem relatively minor.. just odd
I figured they were quick/minor updates to very recent changes, my mistake I'll change this.
I affirm:
What does this pull request do?
Steps to test these changes