All Values

Started by TWRWMOM, March 28, 2018, 11:13:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TWRWMOM

Hi!

I'm new to this game, but played quite a lot of promisance-ish games....

I wanted to ask if there's any place I could read the exact formulas/values for......everything. Is it open-source? I could see the QM-Promisance code, but I don't know which values are the same and which are different....

Thank You!
See you in the game! :)

windhound

Hi and welcome!

We're based on nearly 16 year old QMT and sorta diverged on our own from there. 
tbh I don't mind sharing the code, my only concern is that a bad actor could find some vulnerability. 
Yeah, security through obscurity is no security at all, but /shrug. 
Aint nobody got time for that, we're mostly coasting here. 

A past admin got permission from the original author(s) to not release the code.

Anyways.
I'll pull some values for you, need them for the game guide redo that's on my list anyways. 

Troops - (attack / defense)
Rats: 2 / 1
Weasels: 3 / 5
Stoats: 5 / 3
Skiffs: 6 / 8
(same for all eras)

Attack types -
Standard Attack: Attack with all troops
Surprise Attack: Std attack with +25% attack power, cost +3 additional health, no allies (clan members can 'share defences', brings a small percent of their troops in for ally defense)
Guerilla Strike: Just battles Rats
Bombardment: Just battles Weasels
Frontal Assault: Just battles Stoats
Naval Assault: Just battles Skiffs


Attack modifiers (does not apply to Std attack) -
Drive: +20% attacker losses, +10% land taken
Chaos: +15% enemy losses, -20% land taken
Capture: +15% attack losses, -15% enemy losses, -10% land taken, takes a small percent of the enemy's leaders
Sack: -20% land taken, takes a small percent of the enemy's food and cash based on how many leaders you have (the more leaders you have the less you get)
Flank: a 1 in 6 chance (random) for +20% attack power & +30% attacker losses


Leaders -
Generals Hut (self-spells) -
ratio = Leaders / Huts * RaceMod

Spells: (req. ratio)
Feast:  30
Loot: 30
Raise Defense: 15
Prepare Raiders: 75
Recall Raiders: 80
Move North: 90
Move South: 90
Heal (+10 health): 95
[Magpie] Tax Break: 50
[Marten] Goldmine (extra powered loot): 80
[Ferret] RainDance: 50
[Wildcat] Pressgang (converts workers into troops) : 90
[Painted One] Pay Tribute (weaker Loot + weaker Feast combo): 30
[Stoat] Academy (converts workers to leaders): 90
[Lizard] Fortify (Extra long raise defense): 50
[Wolf] Enrich (You make more food): 50
[Fox] Cloak/Uncloak (Each cast decreases your shown networth by 1%; only affects scores, info page, and search) : 50
[Rat] Battlefield Healers (10% less losses while attacking):50


Warlords Hut (attack-spells) -
(u = user, e = enemy)
$uratio = uLeaders / ((uLand + eLand) / 2) * uRaceMod;
$eratio = ($eLeaders / $eLand * 1.05 * $eRaceMod)*(1+($eTowers/($eLand*2)));

Spells:
Espionage: $uratio > $eratio
Murder: $uratio > $eratio * 1.15
Poison: $uratio > $eratio * 1.21
Steal: $uratio > $eratio * 1.75
Incite Uprising (destroy loyalty):  $uratio > $eratio * 1.3
Sabotage (destroy buildings): $uratio > ($eratio * 1.7)
Leader Attack: Req ratio of 50, $uratio > $eratio * 2.2
Take City: Req ratio of 50, offpts > $defpts * 1.50
Make Attack Opportunity (allows you to attack a maxed enemy): Req ratio of 50, $uratio > $eratio * 1.8


That's the basics
Lemme know if you want somethin' else
A Goldfish has an attention span of 3 seconds...  so do I
~ In the beginning there was nothing, which exploded ~
There are only 10 types of people in the world: Those who understand binary, and those who don't

TWRWMOM

#2
Thank you very much

Didn't know towers could defend attack spells.....interesting, very interesting ;)

Could you please post also the differences between eras and the Magpie and Ferret spells? I'm sorry for the trouble

windhound

Nah, no trouble. 
All this stuff should be documented in the game guide, hoping to have time to fix it soonish.. 

Knew I was forgetting something,
Locations -
Southsward: +80% scouting bonus, +20% worker production
Mossflower: -20% troop production, +20% loyalty production
Northlands: +20% troop production, -20% loyalty production


Ferret's ability gives a chance of an extra heal while foraging (not leader feasting), based on how many foragers you have built. 
$chance = ($users[farms] / ($users[land] * 2)) * 100;
if(mt_rand(0,100) <= $chance)
    $users[health]++;

Magpie works the same way, except for looting (not leader loot) and it's based on how many markets.
A Goldfish has an attention span of 3 seconds...  so do I
~ In the beginning there was nothing, which exploded ~
There are only 10 types of people in the world: Those who understand binary, and those who don't

TWRWMOM

#4
Magpie it is! ;)

Taxes modify max workers, or only Immigration/Emigration?

Gen. Volkov

Immigration/emigration, but functionally it's the same thing. Higher taxes mean more money and food, but less workers will come, or even start to leave, lower taxes opposite.
It is said that when Rincewind dies the occult ability of the entire human race will go up by a fraction. -Terry Pratchett

cloud says: I'm pretty sure I'm immune to everything that I can be immune to...brb snorting anthrax.

Sticker334 says(Peace Alliance): OMG! HOBOES

TWRWMOM

Quote from: Gen. Volkov on March 30, 2018, 07:06:31 PM
Immigration/emigration, but functionally it's the same thing. Higher taxes mean more money and food, but less workers will come, or even start to leave, lower taxes opposite.

Why should they leave? I mean, if max is not reached...

windhound

Taxes affect max worker population and gain/lose rates..  here

        $popbase = round((($users[land] * 2) + ($users[freeland] * 5) + (($users[homes] + ($users[cities] * 1500)) * 60)) * (1-$users[tax]/75));
        $popbase *= $uera["t_peasants"];  //location modifier
        if ($users[peasants] != $popbase)
            $peasants = $popbase - $users[peasants];
        if ($peasants > 0)
            $peasmult = (250/20)/($users[tax]*$users[tax]-$users[tax]+5);
         else
            $peasmult = (($users[tax]-70)*($users[tax]-70)*($users[tax]-70) + 65*65*65)/(40*65*65*65)+(1/100);
        $peasants = round($peasants * $peasmult);

...I have no idea why things are being cubed
A Goldfish has an attention span of 3 seconds...  so do I
~ In the beginning there was nothing, which exploded ~
There are only 10 types of people in the world: Those who understand binary, and those who don't

Shadow

<=holbs-.. ..-holbs=> <=holbs-..

TWRWMOM

Quote from: windhound on March 30, 2018, 11:12:09 PM
Taxes affect max worker population and gain/lose rates..  here

        $popbase = round((($users[land] * 2) + ($users[freeland] * 5) + (($users[homes] + ($users[cities] * 1500)) * 60)) * (1-$users[tax]/75));
        $popbase *= $uera["t_peasants"];  //location modifier
        if ($users[peasants] != $popbase)
            $peasants = $popbase - $users[peasants];
        if ($peasants > 0)
            $peasmult = (250/20)/($users[tax]*$users[tax]-$users[tax]+5);
         else
            $peasmult = (($users[tax]-70)*($users[tax]-70)*($users[tax]-70) + 65*65*65)/(40*65*65*65)+(1/100);
        $peasants = round($peasants * $peasmult);

...I have no idea why things are being cubed

Quite ingenious this formula, even though magic numbers...thank you!

TWRWMOM

Last question lol

Can I have the formula for leaders immigration? I've seen games using only Huts for it, and I've seen it as a function of huts and workers....

windhound

Sure, we're pure hut-based, scaled on your leader/huts ratio.
They load fast, then taper off.

        if ($users[wizards] < ($users[labs] * 25))
            $wizards = round($users[labs] * 0.45);
        elseif ($users[wizards] < ($users[labs] * 50))
            $wizards = round($users[labs] * 0.30);
        elseif ($users[wizards] < ($users[labs] * 90))
            $wizards = round($users[labs] * 0.15);
        elseif ($users[wizards] < ($users[labs] * 100))
            $wizards = round($users[labs] * 0.10);
        elseif ($users[wizards] > ($users[labs] * 175))
            $wizards = round($users[wizards] * -.05);
        $users[wizards] += $wizards;

Seriously though, 's not a big deal for me to grab code snips
A Goldfish has an attention span of 3 seconds...  so do I
~ In the beginning there was nothing, which exploded ~
There are only 10 types of people in the world: Those who understand binary, and those who don't

Graceclaw

How exactly does worker count affect Foraging/Looting/general resource production? Is it ratio-based or raw numbers-based?

Trying to figure out the worker-tax combination.

Shadow

As a method of producing cash and food workers are pretty much useless in this version of the code regardless of tax. I wouldn't bother.
<=holbs-.. ..-holbs=> <=holbs-..

TWRWMOM

Quote from: Shadow on April 02, 2018, 10:19:10 AM
As a method of producing cash and food workers are pretty much useless in this version of the code regardless of tax. I wouldn't bother.

Well.......poo XD

I have 2 other questions....

1 - In this formula of worker population
Quote from: windhound on March 30, 2018, 11:12:09 PM
$popbase = round((($users[land] * 2) + ($users[freeland] * 5) + (($users[homes] + ($users[cities] * 1500)) * 60)) * (1-$users[tax]/75));

homes = weighted average of the different types of constructions (since each type can host a number of workers)? or just Tents?

2 - What happens with bank earnings when total reached the max allowed? Does bank cash counts towards total net value?