Decreasing NM/HNM TP rate and all NM spawn on server start?

Post Reply
uwill99
Posts: 61
Joined: Tue Aug 12, 2014 11:28 pm

Decreasing NM/HNM TP rate and all NM spawn on server start?

Post by uwill99 » Sat Aug 22, 2015 2:49 am

Hi all! Like the title says I'm looking for a way to limit NM TP accrual. In map_darkstar.conf there is mob_tp_multiplier, but no nm_tp_multiplier, like you find in the other lists. If there is no way to manage it, it's fine, things are going well without it. My second question is the following: is there anyway to have every NM spawn on server start?

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Decreasing NM/HNM TP rate and all NM spawn on server sta

Post by TeoTwawki » Sat Aug 22, 2015 7:51 am

The mob one effects the NMs too right now. it'd be kind of trivial to split it into 2 separate ones for normal mobs and NMs (just to a check for the mob type being notorious).

As for the other question, not sure the best way to go about that but it certainly possible. If you want them all to just repop on their own as well, it becomes really easy: set spawn type and give them repop times.
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

uwill99
Posts: 61
Joined: Tue Aug 12, 2014 11:28 pm

Re: Decreasing NM/HNM TP rate and all NM spawn on server sta

Post by uwill99 » Sat Aug 22, 2015 6:24 pm

Awesome name, teotwawki. Been a while since I saw that acronym, was about to fade from memory, so thanks for the refresher! I have no problem going through and slowly chipping away at NMs and making them have their own repop timers - I'm a little defunct on procedurally how it's done. I have Navicat and am an amateur manager of my MySQL database. (and am an amateur, lol kind of hard to say outloud).

Valkurm Emperor - mobid 17199438, groupid 5742, familyid 113, poolid 4124, mobtype 2. It has 49 spawn point locations, but as far as forcing him to spawn - or how he is spawned (lottery etc.) - there isn't any information in MySQL (that is discernible to me.)

uwill99
Posts: 61
Joined: Tue Aug 12, 2014 11:28 pm

Re: Decreasing NM/HNM TP rate and all NM spawn on server sta

Post by uwill99 » Sat Aug 22, 2015 6:42 pm

OK - I've been out of hte loop for a bit on editing my server. Forgot it's probably done in .lua files. So I went there and found this and a post corresponding to it that you had actually commented on Teo:
viewtopic.php?f=19&t=2642&p=14421&hilit ... nce#p14421

This little snippet, does that mean it has a 1 in 20 chance == 5%? That's what I got from the post. Would it just making it 1/1 and once something was killed, it'd respawn with a valkrum emperor 100% of the time, once every hour?

if (math.random(1,20) == 5) then

....

SetServerVariable("[POP]Valkurm_Emperor", os.time(t) + 3600); -- 1 hour

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Decreasing NM/HNM TP rate and all NM spawn on server sta

Post by TeoTwawki » Fri Aug 28, 2015 4:56 am

Can just nuke/comment out the whole random check for making a lotto mob 100% chance after its cooldown is up.

If you want to change any spawn types that's part of mob_groups table
https://wiki.dspt.info/index.php/Core#Mob_Groups
setting to a regular mob (like making leaping lizzy same spawn type as a plain old hill lizard) would make it use the repop times in the database. So say for example you wanna take a mob thats normally force popped and make make it just spawn every hour: change form scripted to normal, then set a 1 hour spawn time in database, comment out the force pop code. Suggest block comments so any changes DSP makes don't trigger edit conflicts.

Code: Select all

    --[[
    all the original
    code still here
    ]]
You do teh same thing to leaping Lizzy and rock lizards bits for lotto pop, if you got that method rather than just setting it to be a 100% chance every cooldown time. (multiple ways to approach it).

Adjusting cooldowns in script and using 100% chances seems easier to me when it comes to the lotto pop ones. *shrug*
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

Post Reply