#Sanginir Tribe

1 messages · Page 4 of 1

versed whale
#

i should prolly do that

#

also

#

one last thing

#

banan can you stop giving ranged weapons to units with 1 range it looks ass

#

thats all

obtuse orchid
#

bruh their early game is not difficult

#

literally just increase their starting stars to 6, 7 or 8

#

and they're good

#

no i didnt midjiwan did

hasty zephyr
#

How long on average does it take midjiwan to break a modded tribe

obtuse orchid
#

so 1369 years

hasty zephyr
#

Ok

hasty zephyr
#

I will have to slightly delay 🗿 so that it releases after the ancients update in September 2029 then

obtuse orchid
#

lol

#

wait

#

that cant be right

hasty zephyr
#

What

obtuse orchid
#

fapingvin prophecized that ancients would be released december 2026

tacit pasture
#

Yup

hasty zephyr
#

Why not both

obtuse orchid
#

december 14

hasty zephyr
#

Both is good

tacit pasture
#

Also gld mods break rarer, but if polymod breaks everything does

obtuse orchid
#

cuz they removed landfill from basic tech

#

and it was in basicosm

hasty zephyr
#

Rest in peace

#

Catastrophic

tacit pasture
#

Btw if you don't overwrite the basic tech and overwrite the t1 techs instead it will be more sustainable

#

Cause basic changes more often

obtuse orchid
#

also i think osamaris had other unlocks in basic tech too

#

but im not sure

#

then again i have a theory based on aquarion

#

if i make it start with a tech that isnt used anywhere in tech unlocks similar to basic

#

it simply shouldnt show up

tacit pasture
obtuse orchid
#

is that correct

tacit pasture
#

Yes

obtuse orchid
#

yessss

#

big brain time

#

when i get to osamaris in the updates i will fix it

#

dw fapingvin

#

but in the case of rak gol this cant be done

tacit pasture
#

I used that before, secrettech. I however don't know whether it is obtainable by others in ruins

obtuse orchid
#

unless i overrides one of the techs with "none" but that seems sus

obtuse orchid
#

ruins only unlocks a tech that u can unlocks

#

if its not in any techunlocks

#

u cant unlock it

tacit pasture
#

Oh

obtuse orchid
#

even through ruins

tacit pasture
#

I thought it was any random tech

obtuse orchid
#

if it were the case u could research living island as vengir

hasty zephyr
obtuse orchid
#

cuz techdata isnt specific to tribes, only the techs that are unlocked, and the techoverrides

#

@tacit pasture when city state polytopia mod

tacit pasture
#

Btw I'm cooking up a diplomacy mod rn

#

But no city states

obtuse orchid
#

no monuments no capturing cities no diplomacy

tacit pasture
#

Religions instead

#

Sort of

obtuse orchid
#

whatttt

#

i dont wanna have to spam missionaries

hasty zephyr
#

Instead of capture you raze the city and salt the ground

obtuse orchid
#

or apostles

tacit pasture
#

No

#

No spreading

obtuse orchid
#

so like

#

pantheon

tacit pasture
#

More like secret societies in civ6

#

They serve di0lomatic purposes

hasty zephyr
#

Polytopia Catholicism mod

tacit pasture
#

And also some perks

obtuse orchid
obtuse orchid
tacit pasture
#

If you share a Way with another tribe they get opinion boost, if you have differing Ways then a minor opinion penalty. There are three Ways you can only choose one after building your first temple my plans are. Each Way granting unique bonuses in a tech-tree fashion

hasty zephyr
#

I think a cool idea for a religions mod is if religions had borders like cities and you could swap between the city borders view and religion regions view

obtuse orchid
#

so like civ religion view

#

got it

hasty zephyr
#

I was thinking worldbox but prob same

tacit pasture
obtuse orchid
tacit pasture
#

Cause I am trying really hard to make everything dynamic

#

Meaning nothing is stored

hasty zephyr
#

Rip

tacit pasture
#

Basically

#

That wouldn't be stored anyways (so effects are okay)

#

Cause storing things is really messy

obtuse orchid
#

what if instead u had pantheons u could pick one of like a bit and u get it when capital reach a certain level or they can be unlocked by doing different things like a ruin or other things

#

and

#

they buff things

hasty zephyr
#

Wall gn

tacit pasture
#

Let me search an image of what I mean

obtuse orchid
#

like perhaps one can be god of the sea that makes port give 2 pop

#

or god of the forge which makes swordsmen cost 4 stars

#

or god of the sun which turns ur tribe into mica

tacit pasture
#

so like in my space mod it was, the idea is directly stolen from that btw. Just in this case the Ways will be a separate tech tree which i still got to figure out somehow

obtuse orchid
#

wtf tech trees can work like that?

tacit pasture
#

I uh had to mangle it

#

Even do a forbidden Harmony.Unpatch of a polymod method lol

#

But what I mean is on the bottom half you could choose from three Ways

#

And once you choose the others' cost is visually 999 physically impossible

obtuse orchid
#

what if it is possible

#

because you picked bugali

tacit pasture
#

Nah I mean I coded it to not be possible

#

And the price is just for aesthetics reason

obtuse orchid
#

just to troll you should make it always cost 1 star more than the player has

tacit pasture
#

Yeah well I might just make them entirely locked without a price in my diplomacy mod

tacit pasture
obtuse orchid
#

broken level 300

tacit pasture
#

More, cause shitcode + time + 1 kloc + total conversion + before tribes were moved to backend

obtuse orchid
#

@tacit pasture i feel like i have to, right?

tacit pasture
#

Bruh lmao

obtuse orchid
#

251 views

#

i have to support the ultimate hamburgerlord

#

53 likes

#

over 20% approval rate

#

this is a good video usually itsl ike 5-10%

#

ITS SO PEAK

#

instant subscribe

#

i am the 652nd sib

#

sub

obtuse orchid
#

everybody sub to "hamburgerlord"

#

the video is so peak

#

he actually makes the babylonian food from the delegation 🙏

#

apparently its pretty good

#

this youtuber is actually goated wtf

#

must underrated person of all time

#

legendary youtoube pull

#

not only is he a chef from what i can tell

#

but also

#

a musician

#

and an artist

#

tf

#

how is bro doing allat

hasty zephyr
#

He’s a Renaissance man wha

obtuse orchid
#

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa polyscript

obtuse orchid
#

🧛‍♂️

#

guys the vampire is so cooked

obtuse orchid
#

guys so you know how this tribe has a bunch of techs and abilities that buff bats and stuff

#

so with all the buffs stacked and when attacking a unit with less hp

#

a bat has 3.5 attack

#

and heals 6 hp

#

vampire will have 5 attack

#

ig its a good thing that it only triggers on low hp enemies huh

#

bats having escape might be diabolical tho

obtuse orchid
#

wait no that wouldnt make sense

#

idk how i will balance this

versed whale
#

heal on kill?

obtuse orchid
#

but if the bat will have a total of 3.5 attack when attacking a unit with less hp than it, its basically guaranteed to heal anyway

#

but another issue is that it wont take retaliation damage when killing so the healing kinda goes to waste

tacit pasture
#

that was how it was originally no? on kill only

#

i could misremember

obtuse orchid
#

idk

versed whale
#

and if bats have escape thats good

obtuse orchid
#

ok but they cost 3 stars wouldnt that be a bit strong

versed whale
#

stats?

obtuse orchid
#

maybe 0 defence

versed whale
tacit pasture
#

too many stats for a 3 star unit yeah

versed whale
#

remove surprise

tacit pasture
#

add persist

versed whale
#

1,5 attack is pretty bad idk

tacit pasture
obtuse orchid
versed whale
#

fly is my main concern tho

#

not like it should be removed but that may lead to shennanigans

tacit pasture
#

it can not not fly tho

versed whale
#

yh ik

tacit pasture
#

btw original sanginir was very op, especially on like water world maps

#

just because of bats

versed whale
#

ok i think add static? vetting healing bats is kinda op

tacit pasture
#

true you dont need veteran cannon fodder

versed whale
#

you could also add

#

some shit like heli in militas

#

basically less damage on water tiles

#

so theyre not that busted on conti

tacit pasture
#

less damage during the day?

#

would make sense since they are vampires

versed whale
#

bro

#

day & night cycle is a mod i wanna do someday tho

tacit pasture
#

peak

obtuse orchid
#

it just occured to me that

tacit pasture
#

i think klipi's midnight elyrion reshade could help with that

obtuse orchid
#

bats are the primary unit of this tribe

#

replacing riders + roads ofc

#

they have a big weakness

#

persist and splash damage

#

so they cant really fight against bombers and knights

#

if u spam them

#

ofc knights remove the need for bat spam if u need to kill a lot of things quickly

#

so if i want to balance the bats all i need to do is remove knights

#

that way bats are spammed

#

but they get bombed

#

by bombers

#

yk

#

to fight those you'll need vampires or swordsmen bat swarm

versed whale
obtuse orchid
#

what one

#

cym?

versed whale
obtuse orchid
#

bomber?

versed whale
#

ur not gonna have bombers and knights bbg

obtuse orchid
#

they wont be able to beat bombers cuz they will do like 4 dmg to it

#

if it has 15 hp

obtuse orchid
versed whale
#

i mean with zebasi t30 eco sure

obtuse orchid
#

u need to finish like

#

3-5 tech paths

#

in order to max out bats

#

btw

versed whale
#

stock bats are pretty good too

#

bcuz of flight

obtuse orchid
#

i can reduce movement

#

hmmm

versed whale
#

on dry they suck but on any other map

obtuse orchid
#

reduce movement to 1

tacit pasture
#

nah

obtuse orchid
#

frenzy restores it back to norma;

versed whale
tacit pasture
#

i think 1 movement bat wouldnt be

#

bat

obtuse orchid
#

fair

#

hmmm

#

well how tf do i balance it then

versed whale
#

its a rider alt for crying out loud

tacit pasture
#

maybe they should only have 1 movement on water

versed whale
#

yeah

#

yeah

obtuse orchid
#

increase cost once u research vampirism?

versed whale
#

that

versed whale
tacit pasture
versed whale
#

reverse amphibian

obtuse orchid
#

theres a tech in the water path that increases bat movement when adjacent to no other unit

#

no other enemy unit

tacit pasture
#

that is also simple

#

i think

obtuse orchid
#

so u can use bat swarm to travel ur land units across water more easily

#

but also

#

reducing movement on water

#

doesnt balance its high attack and healing

versed whale
#

its 1.5

obtuse orchid
#

2.5

tacit pasture
#

make it 1.4 then 🤷‍♀️

obtuse orchid
#

add vampirism empowerment

#

+0.5 base attack

#

3

versed whale
#

and why does it add 2.5 attack?

obtuse orchid
#

and add vampirism thirst

#

+1.5 from leech total

#

3.5 total

obtuse orchid
obtuse orchid
tacit pasture
versed whale
obtuse orchid
#

bat base attack: 1.5
add leech: 2.5
add empowerment: 3
add thirst: 3.5

obtuse orchid
#

2 bats would be able to 1 shot a warrior

versed whale
#

thats not that powerful

versed whale
#

op!!!!!

obtuse orchid
obtuse orchid
versed whale
#

do riders have 1.5 base attack

obtuse orchid
#

and can a rider heal to max hp when killing a 3 hp unit when at 4 hp

obtuse orchid
#

ok well bottom line

#

im removing surprise

tacit pasture
# versed whale no

how do you check for what unit it is attacking while patching getattack? (it did it by going through actionstack iirc which is not advisable ig). BattleResults are a good method too but they no longer deal with attack value and simply with pure damage

obtuse orchid
#

that should be good enough

versed whale
#

idk

tacit pasture
#

now do note that when i made this i was like a year younger and more amateur but it was a pretty big dilemma for me at the time

obtuse orchid
#

also bats when they have frenzy

#

have 3 movement

#

when leech is triggered

#

it lasts 1 turn tho

#

is this op

#

or is it not op

versed whale
#

can you win a conti 4 opp game by only spamming bats in less than 20 turns?

obtuse orchid
#

idk the polyscript isnt there yet

versed whale
#

oh

obtuse orchid
#

rn bats are a decent unit and they dont have healing or attack bonus

#

they can just poke the enemy to death

#

but now that ive removed surprise

#

this might not be an issue

versed whale
#

i think if you remove a movement on water it will be perfectly fine

obtuse orchid
#

k

#

ig i might as well start polyscripting

tacit pasture
#

If you run into any issues or don't know how to start calmly ping us (or me at least)

versed whale
#

you can ping me angrily too

obtuse orchid
#

i have a question

#

so yk the conquistor nobuildability that i did for the colonizer improvement

versed whale
#

yeah

obtuse orchid
#

well if i call it the same thing with sanginir

#

will it cause issues

versed whale
#

yes

#

ofc

obtuse orchid
#

k

versed whale
#

call it sanguinirshrektallmcdonaldshomunculus

obtuse orchid
#

, "nobuildsanginiredition"

versed whale
#

,"ok"

obtuse orchid
#

when i copy i dont wanna have to write down a comma and a space before so i just copy that too

#

ok well one patch is done 🎉

#

ig i will start with leech since it is super important

#

i could also rename it to "vampiric" but idk

#

i will start with the healing since that is more visual and the code for it still works

#

at least it did work when i tried

tacit pasture
#

It won't cause issues if the project is different

#

Same method named

obtuse orchid
#

name

tacit pasture
#

Oh yes that will

versed whale
#

same enum entry will

obtuse orchid
#

k

#

this is the leech healing

#

it looks alright at first glance

#

tho all that stuff at the bottom i dont quite understand

#

like why is there heal(10)

#

and

#

health +=10

versed whale
#

what

#

tf

#

wait

#

use polib lmao

#

we have HealUnit in utils

tacit pasture
#

one is visual and one is not, but this is very old implementation of mine

obtuse orchid
obtuse orchid
#

also

#

can i just remove "flag" and "flag2"

#

with if statements

tacit pasture
#

also this does not check whether it surpasses max hp

obtuse orchid
versed whale
#
public static void HealUnit(GameState gameState, UnitState unit, int amount)
    {
        var maxhp = unit.GetMaxHealth(gameState);
        var currhp = unit.health;
        if (currhp >= maxhp)
        {
            return;
        }
        var diff = maxhp - currhp;
        if (diff < amount)
        {
            amount = diff;
        }
        if (unit.HasEffect(UnitEffect.Poisoned))
        {
            amount = 0;
            unit.RemoveEffect(UnitEffect.Poisoned);
        }
        unit.health += (ushort)amount;
        Tile tile = MapRenderer.Current.GetTileInstance(unit.coordinates);
        tile.Heal(amount);
    }
obtuse orchid
#

ez

#

not even an error so it must be right

#

wait

#

since theres an upgrade that increases its healing

#

i should make a variable for how much it heals

#

let me cook

tacit pasture
versed whale
#

it isnt much nicer tho

obtuse orchid
#

cuz i cant use "else" with this

#

how does one store numbers in a variable

#

doesnt this work?

#

cuz then

#

"ushort"

#

LMAO SO EASY

#

TS DOESNT have an error

#

im a pro at polyscripting 😂

versed whale
tacit pasture
#

ushort and int are basically convertible into one another using (ushort)variable if variable is int

obtuse orchid
versed whale
#

yeah

#

same as any if

#

except the flag is a variable

obtuse orchid
versed whale
#

not just shat into there

obtuse orchid
versed whale
obtuse orchid
#

wait yes i can use if statements

#

its just

#

flag is just

#

whatever would be in the bracket

#

but outside of it

#

and i dont understand

#

why

#

fapingvin did that

versed whale
#

i personally despise it

tacit pasture
#

Bro i dont even remember

obtuse orchid
#

its goofy

tacit pasture
#

I made this mod like 12 months ago

versed whale
tacit pasture
#

Lot has changes since

versed whale
#

a year

tacit pasture
#

Not a full year idk

versed whale
#

so like

#

an almost year

tacit pasture
#

I still use flags but not that egregiously

#

Basically if you repeat the statement it is better to use a flag

obtuse orchid
#

is this cooking

tacit pasture
#

You may not need to name it a flag btw

obtuse orchid
#

the only issue is player doesnt exist

tacit pasture
#

And have it have a descriptive name

versed whale
#

yeah lets just make this 189264716 character statement into a boolean cuz that helps readability

versed whale
tacit pasture
obtuse orchid
obtuse orchid
#

can i just like

#

throw that in the parameters

#

wait lemme try that

versed whale
#

no what?

#

no

#

why would it be that

#

unitstate is just a unit on the map

tacit pasture
versed whale
#

you can get the owner of said unit

obtuse orchid
#

but gamestate

#

is already there

versed whale
#

cuz of currentplayer being non sanguinir

#

very important i know

obtuse orchid
#

idk what exactly u mean here but if a bat gets attacked leech doesnt apply

#

it only applies when the bat attacks

versed whale
#

no if like for example theres a mod that makes it so a unit makes all nearby units attack it

#

for some reason

obtuse orchid
#

thats stupid

tacit pasture
#

Bruh

obtuse orchid
#

nope

versed whale
#

yeah

obtuse orchid
#

i domnt care about

versed whale
#

but its good practice

tacit pasture
#

Use unit.owner

obtuse orchid
#

scenarios that are that specifics

tacit pasture
#

I meant

#

Like not __instance

obtuse orchid
#

so um how do i fix the issue with player not existing in the current context even tho i have gamestate in the parameters

versed whale
#

you did this already

obtuse orchid
#

var success = gameState.TryGetPlayer(unitState.owner, out PlayerState player);

versed whale
#

yes

#

that

obtuse orchid
#

copied from conquistor

#

the only issue is

#

I NEED UNIT STATE

versed whale
#

bro u already have

tacit pasture
obtuse orchid
#

but not

#

playerstate

#

unit state i mean

versed whale
tacit pasture
#

You have unitstate only dedined later

#

Lines are executed in order

obtuse orchid
#

wait it worked

#

lmao

versed whale
#

but you can also do __instance.Origin

obtuse orchid
#

this is too easy

tacit pasture
#

And if you want to reference a unitstate you have to have it already

versed whale
#

send code

obtuse orchid
#

no errors

versed whale
#

ok what

obtuse orchid
#

im cooking

#

let me cook

versed whale
#

are we deadass

obtuse orchid
#

i mean

#

i would assume so

#

considering i just made this

#

with no outside help (almost)

versed whale
#

ok build and launch and look for red in the console

obtuse orchid
#

but half of it is fapingvin old code

#

blame that

versed whale
#

just saying

#

you cant just add

#

random parameters

obtuse orchid
#

why not

versed whale
#

based on what you need

obtuse orchid
#

rip

versed whale
tacit pasture
#

Bro where do you spawn them in from?

#

Like they dont exist

obtuse orchid
#

nah itll work trust me

tacit pasture
#

You cant just conjure them into existence ig lol

obtuse orchid
#

mb

#

cuz

versed whale
#

banan just do __instance.Origin.unit

obtuse orchid
#

it seems like i just did

obtuse orchid
versed whale
#

instead of unitState

obtuse orchid
#

but first

#

i check if it works

versed whale
obtuse orchid
#

ok fine

#

i'll do it the right way

versed whale
#

thats why it allows

tacit pasture
versed whale
#

yeah

obtuse orchid
#

i dont see an error

#

but the code dont work

#

rip

versed whale
#

but if __instance.Origin.unit is null then there are bigger problems

versed whale
#

it wont even patch

#

on launch when it gets to injecting ur code it will throw an error

obtuse orchid
versed whale
obtuse orchid
#

i know

#

but my log thing

#

is still there

versed whale
obtuse orchid
#

yes

versed whale
#

huh

#

weird

obtuse orchid
#

mwahaha

#

but it doesnt work so no matter

#

__instance.Origin.unit

#

where do i put this

#

idk what to do with this lump

tacit pasture
#

ok im on my laptop now what do you have rn

obtuse orchid
#

trying to put this in __instance.Origin.unit

#

somewhere

#

so it works

#

in place of unitstate

#

wasd has been very helpful in telling me that i need it

#

but he has been useless in telling me how i need it

#

he's like a bool when i need a var pffft

tacit pasture
#

ok so you see in first line you use unitState but it is never defined. And you see how later there is a bunch of TileData tile and TileData tile2 definitions. What wasd probably meant is to use the fact that you can get the unitstate from the tile. So tile2.unit is a unitstate of the origin so the attacker

#

but for that you'd need to put the tile and tile2 definitions at the start of the method

#

and replace unitState with this way of accessing the units

obtuse orchid
#

what u mean to say is that

#

i can just put

#

tile2.owner

#

instead of unitState.owner

#

wait no

tacit pasture
#

No, tile is the tile the attacj happens on. If unit is on foreign territory tile owner is not the same as unit owner

obtuse orchid
#

thats not good

#

because

#

that means u have to own that tile

#

hmmm

#

aaa

#

wait would something like this work

#

if there wasnt

#

an error

#

aaaaaaaaaa

tacit pasture
#

Just slow down and read the lines

#

Like what they mean

obtuse orchid
#

im cooked

tacit pasture
#

Nah

#

Just dont panick

obtuse orchid
#

wait quick question

#

var success = gameState.TryGetPlayer(tile2.owner, out PlayerState player);

#

success aint even used

#

i dont need this whole chunk

tacit pasture
#

This TryGetPlayer method is tricky cause it has two outputs

#

The primary one is whether it worker or not, true or false

#

The secondary output is in the out PlayerState player meaning it creates a variable

obtuse orchid
#

i use player later so this is useful

tacit pasture
#

Yes don't delete that

obtuse orchid
#

ok well i see this which might be useful

#

aside from that idk

obtuse orchid
#

cuz

#

tf

#

wait why was any of this necessary?

#

cuz like

#

it wasnt in the og version

tacit pasture
#

There was no need for playerstate in og

#

ig

obtuse orchid
#

why is there a need now

tacit pasture
#

But don't overcomplicate it:
You have coordinates.
You can use coordinates to get tile.
You can use tile to get unit.
You can use unit to get player.
With player you can check if player has a tech

obtuse orchid
#

oh yeah to get the tech

#

got it

#

no

#

this doesnt work

#

but

#

im trying something

tacit pasture
#

You are trying to have a unit which is not of UnitState but of TileData

obtuse orchid
#

not much success here either

#

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

tacit pasture
#

GetUnit is a method

obtuse orchid
tacit pasture
#

You need to call it with parameters or if it doesn't have any then with ()

obtuse orchid
#

its so over

tacit pasture
#

Btw you dont need getUnit

obtuse orchid
#

bruh

tacit pasture
#

tile2.unit

#

Is the unit

obtuse orchid
tacit pasture
#

Just check whether it exists so if tile2.unit == null then return thus leave the method

obtuse orchid
tacit pasture
#

Almost there

#

But

#

unut.owner is just the ID

#

Of the player

#

And thus you need TryGetPlayer which gets you a PlayerState from ID

obtuse orchid
#

ah

#

u mean like this error?

tacit pasture
#

TryGetPlayer is the peculiar method meaning here player is actually gonna be a bool

#

And you need out

obtuse orchid
#

couldnt i just have done this the whole time

tacit pasture
#

To get real playerstate

tacit pasture
obtuse orchid
#

cuz that was there

#

all i had to do

#

was

#

put unit in

tacit pasture
#

Lol

obtuse orchid
#

ts dumb

#

ok so while i was failing at this i was attempting to fix the healing max hp thing

#

with this

#

theres just one error

tacit pasture
#

What is the value of flag btw

obtuse orchid
#

btw the else one is if the unit has more hp than the max hp - heal amount so it would be going over max hp normally but not with this

obtuse orchid
#

i just fixed it by putting it directly in the if bracket

tacit pasture
# obtuse orchid with this

The error is most likely the types tho idk getmaxhealth returns an int i think so cast it to (ushort)that

obtuse orchid
#

that doesnt work too well

tacit pasture
#

What uh wha

#

Okwy

#

So

obtuse orchid
#

im cooked

#

wait no

#

im cooking

tacit pasture
#

I meant the (ushort) in front of tile2.unit.get...

#

Also ; after every line

obtuse orchid
#

it made more errors

#

dawg

#

its over

#

i cant even do simple polyscript

#

cant i

#

ushort val = (ushort)unit.GetMaxHealth(gameState);
this.HealAmount = ((this.FixedHealAmount > 0) ? this.FixedHealAmount : ActionUtils.GetHealAmount(gameState, tile));
ushort val2 = unit.health + this.HealAmount;
unit.health = Math.Min(val2, val);

#

technically copy this

#

at least parts of it

#

also i need to make it remove poison if the unit is poisoned

#

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

#

polyscript sucks

#

k im done fortoday

versed whale
obtuse orchid
#

ok guys

#

tutorial time

#

do i pick the 10 minute tutorial

#

or the 1 hour tutorial

#

wait shit theres a four minute one

#

GOD DAMN SOMEONE MADE 100 SECONDS

#

nvm now we're back up to 4 hours

#

HEY the code monkey didnt list "ushort"

#

HE SAID INT WAS NUMBERS

#

WTF IS USHORT FOR

#

guys i locked tf in

#

i dont see an error

#

im such a chef

#

dawg what

#

ok well i'll just come back tomorrow

versed whale
versed whale
obtuse orchid
#

im pretty sure it was saved

#

it says theres an error stil

#

still

#

but

#

it doesnt show

#

like tf

#

also why is all the text blue i feel like there should be green and stuff too

tacit pasture
#

Did you open it as a folder?

obtuse orchid
#

yes

#

ts goofy

tacit pasture
#

Screenshot

obtuse orchid
tacit pasture
#

Yeah so close the project and reopen cause that is not normal

#

And happens usually when vs code does not know what is the content of the code

obtuse orchid
#

wait i know the issue

#

in one of the files

#

it was still called

#

polyscripttemplate

#

but i had switched it to "sanginir"

obtuse orchid
#

nothing is working dread

#

whyyyy vscode

#

notepad superior ig

tacit pasture
#

It is somehow an issue of vscode not sweing the project

obtuse orchid
#

vscode is bling

tacit pasture
#

Like fix all names even ones in .sln file

obtuse orchid
#

these used to be PolyScriptTemplate

#

and i also changed the name of the csproj file accordinglu

tacit pasture
#

Hmm

obtuse orchid
#

yea no ts sucks

#

i shouldve just kept it at polyscripttemplate

#

tf was i thinking

#

might have to restart ngl

#

i even tried getting a new polyscripttemplate and that didnt do anything 🙏

#

my vscode is broken

#

wait nvm

#

it works

#

damn even this strat doesnt work

#

wait thats cuz i did it wrong

#

YOOO

#

I GOT THIS

#

💔

#

;polyscript hates me forever

versed whale
#

mind sending the error?

tacit pasture
#

Again som3 kind of type error

#

Like

obtuse orchid
#

ITS A USHORT DAWG NOT AN INT 🙏

tacit pasture
#

cast whole thing into ushort

obtuse orchid
#

wtf that worked

tacit pasture
#

(ushort)(blablabla)

obtuse orchid
#

polyscript is too ez

#

ty fapingvin

tacit pasture
#

Yeah ushort - ushort is int sometimes

versed whale
#

fr?

tacit pasture
#

Idk

#

Just guessing

obtuse orchid
versed whale
#

crazy

obtuse orchid
#

i hope this works

versed whale
#

faps strats are goated

obtuse orchid
#

REAL

#

fapingvin #1 polyscripter

#

IT DIDNT WORK

#

NOOOOOOOOOOOOOOOOOOOOOOOOOOO

#

MY UNIT AINT HEALING

#

AAAAAAAAAAAAAAAAAAaaaa

tacit pasture
#

Any loading errors or any errors?

obtuse orchid
#

I TRIED SO HARD

tacit pasture
#

In logd

obtuse orchid
#

AND GOT SO FAR

obtuse orchid
#

BUT IN THE END

#

IT DIDNT EVEN MATTER

#

it looks good

versed whale
#

it motivates me

obtuse orchid
#

:emo:

versed whale
#

also theme is fitting

#

cuz nothings working smiling

obtuse orchid
#

thats so real

#

:(

versed whale
#

also

obtuse orchid
versed whale
#

ok this is going in mod ideas

versed whale
obtuse orchid
#

?

obtuse orchid
#

"Check PolyMod's mod menu to ensure your script is toggled ON"
this is what polymodder said

#

tf

#

i didnt know i needed to toggle ts

#

could it be this "null" thats after checking if it has the ability

#

idk why its there

#

it just is

obtuse orchid
#

if this worked i could cook so hard on so many aspects of this tribe

#

its like 1/3 of the polyscript

#

most of it is just modifying this abilit

#

ability

#

the other 2/3 is vampire castle and transforming with bat swarm

#

oh and giving pop to city when killing unit

obtuse orchid
tacit pasture
#

Ok just a sec

#

ok so i am here

obtuse orchid
#

:D

tacit pasture
#

so

tacit pasture
obtuse orchid
#

yes

#

it doesnt work 😭

#

it loads properly

#

no error

#

but

#

when it comes time to heal

#

nothing happens

tacit pasture
#

is your tech named feastsgn?

#

not sng?

obtuse orchid
#

its not required for leech to work

tacit pasture
#

yeah sorry im blind

#

thought that if was for whole thing cause of weird discrod indentation

obtuse orchid
#

thats not my fault its the way discord shows it

tacit pasture
#

ok so current code

#

like if bat has max hp of 5 and heal value is 2 and its current hp is 4

#

it will not execute

#

cause

#

you check for if current health is lower than 5-2=3

obtuse orchid
#

yes but

#

the else

#

checks for if its lower than max hp at all

#

no?

#

then it heals by max hp - current hp

tacit pasture
#

oh sorry should read the whole thing lol

#

😅

obtuse orchid
#

lol its ok

tacit pasture
#

im like going line by line and speaking too soon

obtuse orchid
#

it must be bad if you've been typing this long

#

or you simply have no clue and we're in the same boat

#

then again if its the bottom part thats the issue (which i shouldve tested) i could just make leech heal > max hp but that'd be goof

tacit pasture
#

okay so healing looks kinda okay
first and foremost the method you are patching is attackcommand.execute. Maybe i was the one to patch this in the olden days, but something like AttackAction.Execute is probably better (and probably not change much but is safer)

try replacing typeof(AttackCommand) with typeof(AttackAction) and "Execute" with nameof(AttackAction.Execute), and also the AttackCommand in the parameters to AttackAction.

This probably won't solve it though. It is generally safer btw to use nameof(method) instead of typing the method in strings.

The bigger mistake is only now i realized, and this is why it is not working:

you put the if (tile2.unit != null ...) if-gate. the blue curly brackets indicate that if the unit exists, then it checks for the first kind of unit health comparison (hp is strictly less than maxhp-healamount).

And you check for the other unit health comparison in the else gate of this if-else, as in if the unit does not exist

#

the first "mistake" is not really a mistake, more like a good thing to always do

#

or at least I mean I prefer patching actions over commands personally

#

if you right click the code and press format document, you'll see why the if-else gates are incorrect

obtuse orchid
#

oh shit

#

ok

tacit pasture
#
else
        {
            if (tile2.unit.health < tile2.unit.GetMaxHealth(gameState))
                {
                Tile tileInstance = MapRenderer.Current.GetTileInstance(tile2.coordinates);
                UnitState unit = tile2.unit;
                ushort maxHP = (ushort)tile2.unit.GetMaxHealth(gameState);
                ushort currentHP = (ushort)tile2.unit.health;
                healAmount = (ushort)(maxHP - currentHP);
                tileInstance.Heal(healAmount);
                unit.health += healAmount;
            }
        }

this is only checked if the unit does not exist

obtuse orchid
tacit pasture
#

typeof(AttackAction), nameof(AttackAction.Execute)

obtuse orchid
#

ah

#

mb

tacit pasture
#

same structure as before

#

but different method

#

commands may not be executed if they are invalid. I like to patch action in these cases, since I want it to heal only and only if the attack has commenced

#

plus it is more predictable

tacit pasture
#

and dont forget to replace the instance in the parameters with AttackAction __instance as well

obtuse orchid
#

i got it

#

i understand

tacit pasture
#

imma soon sleep now tho

obtuse orchid
#

?

obtuse orchid
#

gn

tacit pasture
obtuse orchid
#

ty fapingvin

tacit pasture
#

the main issue was in the if-else part

obtuse orchid
#

yes mb

tacit pasture
#

if you fix that it will probably work

obtuse orchid
#

aaaa i need to get better eyes

obtuse orchid
#

ooh

#

thats neat

tacit pasture
#

cause it makes indentations

obtuse orchid
#

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

#

ok its logging time

#

wait

#

how does one put stuff in the logs

#

"logger" doesnt exist in the current context

#

rip to that ideaè

#

polyscript is ass 💔

tacit pasture
#

modLogger

#

Probably

obtuse orchid
#

im cooked

obtuse orchid
#

production of this tribe is halted until i can decipher the issue

obtuse orchid
#

btw if u can find out why it doesnt work pls tell me

hasty zephyr
#

hmm

#

i dont know

obtuse orchid
#

hi cleigh

#

bestow upon me your divine wisdom

versed whale
#

@obtuse orchid do Harmony.PatchAll(Main);?

#

no sorry

#

not that

#

Harmony.CreateAndPatchAll(typeof(Main));

#

this

#

in load method

hasty zephyr
versed whale
#

and you can burn the oranges for fuel if you want

#

leaves make for great furniture i heard

hasty zephyr
#

this person knows whats up

#

listening to mosshome ambience rn. Very good for working on projects. Coral gorge soundtrack too

obtuse orchid
#

is this conquistor hate

#

hating their oranges

versed whale
obtuse orchid
#

trying

versed whale
#

will fix 100%

tacit pasture
#

Oh my yeah ofc

obtuse orchid
#

later ig

hasty zephyr
tacit pasture
#

CreateAndPatchAll

versed whale
tacit pasture
#

It's telling Harmony to do its job

tacit pasture
versed whale
#

good idea

#

btw

#

rewriting ur parsing

#

do we really need both cases?

#

cant it just be lower?

tacit pasture
#

Eh

#

Should be simple if having to implement it once no?

versed whale
#

ye

#

so imma remove it for now, port everything over to utils and implement them there

tacit pasture
#

I guess there are mods that depend on that but not the end of the wotld

versed whale
#

imagine updating mods

#

ok while were at it can i remove BuiltBySpecific?

tacit pasture
#

Imagine updating gld mods, just like do it

versed whale
#

unitAbilityWhitelist exists

tacit pasture
#

Eh idk

obtuse orchid
tacit pasture
#

It must be if it works

#

Like in Main.cs somewhere

obtuse orchid
#

WAIT I SEE SOMETHIGN

#

"PreFix" and "postFix"

#

only the non-functional heal leech code

#

uses pre

#

im replacing it with post

obtuse orchid
versed whale
obtuse orchid
#

guys im cooking

versed whale
#

not PatchAll

obtuse orchid
#

ah

tacit pasture
#

Changing prefix to postfix won't change much

#

Whether it executes before or after battle

obtuse orchid
#

mb

obtuse orchid
#

interesting

#

so for attack it would be prefix

#

attack increase i mean

versed whale
#

yes

#

i mean

#

no?

#

not really

#

we use it mainly to replace existing methods/block them from ever firing

#

"extreme cases" as klipi put it once

obtuse orchid
tacit pasture
#

Difference between pre and post is quite literally:
It executes before or after the method took place. Both have use cases

versed whale
#

AT LEAST I HOPE NOT!

tacit pasture
#

Yes there is GetAttack

obtuse orchid
#

mb

tacit pasture
#

Also with prefix you can skip the original method telling poly to not execute it at all

obtuse orchid
tacit pasture
#

That's why replacing method with your own is frowned upon cause it breaks compatibility

obtuse orchid
#

hehehehe

#

i have some cheeky ideas

#

jk

#

i do not have ideas from that

obtuse orchid
versed whale
#

@obtuse orchid rename gameState to state in the leech patch

obtuse orchid
#

why does that change stuff🤔

#

yeah so

#

oh uppercase

#

mb

#

AHAHAHAHAHAHAHHHHHHHHHHHHHHH

#

IT WORKSSSSSSSSSSSSs

#

oh it works on every attack

#

thats... not good

#

or is it?

#

no its not good at all

#

wait

#

no it doesnt

#

AHAHAHAH IT WORKS AS INTENDED

#

EAHAHSASHAHAHA

#

EVEN FEAST WORKS

#

i love polyscript ❤️

#

my bats dont want to die

#

unless they are attacked

#

if u are smart u can win

#

GOOOO VAMPIRE

#

HEAL 6 HP PER TURN

#

holy shit sanginir is fun

#

i love the mass healing

#

ok its time to lock in on the attack increase

tacit pasture
#

Nice

obtuse orchid
#

fapingvin you have no idea

#

how satisfying

#

it is

#

to bring a bat from 4 hp

#

back to full hp

#

after killing a catapult

#

sanginir actually S tier tribe

tacit pasture
#

Can't wait to play this

obtuse orchid
#

this looks so EASY

#

mwahahaha

tacit pasture
#

I mean it is uh

obtuse orchid
#

unless it dont work

tacit pasture
#

Questionable

#

Method

obtuse orchid
#

whats wrong with it

#

is it buggy