#Sanginir Tribe
1 messages · Page 6 of 1
unitEffect?
i can copy poison code for this wait let me cook
should i make leech work if units are same hp
if i did, bats would dominate warriors
if i didnt, they would not dominate warriors as hard, and live with 5 hp
oh it does work on same hp enemies
nice
yall will ened to lock in
to beat sanginir
bro why
literally
add 1 gld entry
and do unit.AddEffect(<youreffectenumcachedandall>)
💥
if this is in poison code i would copy it
btw
i know its not hard
im converting my project omggg im shitting my pants will i lose 2 years of progress
ok thats anticlimactic i need to wait 10 years for the shaders to compile
Also addpatchdatatype
i think so
i have this
issues are "effectdata" cant be found and UnitEffect doesnt have a definition for it
which is an easy fix, gld
wait it must UnitEffect instead of EffectData
hmmm now type
that is in fact what i was doing
i always mix this and unitability up
im not sure effectData.Type suggests that but ok
refer to the image i literally just sent
how dumb do u think i am bruh
not at all
no
cuz i had this
then good, all u need to do is do gld and addPatchDataType
gld
and wtf is
addpatchdatatype
ok first of all unitEffect not UnitEffect in gld pls, consistency is key
1 sec
oh ye mb
PolyMod.Loader.AddPatchDataType("unitEffect", typeof(UnitEffect));
i think sacrifice code still works right @tacit pasture so i should be able to just copy and paste that one
ty

You have to do enumcache
wait does that go in the load method
Yes
And the EnumCache is
EnumCache<UnitEffect>.getType()
I believe so
GetType
No no
ripè
it is in load
brooo
That is for when you want to use the effect later
literally polib code
now sanginir will be cursed to never work
mwahahaha
ok no errors
WHAT
NO
lol i dont need addpatchdata
ts works on its own
you do tho
not in game it doesnt
yall tried to trick me i knew you were tricksters
obviously vs code wont show error
oh
wait how come
it needs to check in patch
for unit effect
but not for literally anything else
using ur goofy polib code
cuz this one isnt built in by polymod
that makes empowerment break
it has to check in enumcache for everything custom
thats old polib
and you dont need addpatchdata for usual custom stuff but uniteffects is not in enumcache by default
@versed whale can you do it im not at pc ig
i cant be fucked to test my shit rn im doing gamedev with my 1 in 10 years burst of motivation
bro what? just send over a single file
ok fine i need to compile 3k shaders
single file that doesnt work
oh
what are u making
uh what???
brooo
im in the middle of a change
game
i mean i would
but
3k shaders
cuz i upgraded ue5 versions
anyways ig while compiling shaders ig i can fix polib after breaking it again
guys check out this ✨ method ✨ with this ✨ code ✨
ok wait
one small detail tho
if i make it remove effect there
does it remove when it attacks
yes but it returns good number so its ok
or does it remove as soon as the possibility arises
wait no thats not an issue
cuz
it only applies the effect once leech healing triggered
where does the effect get added?
(even if unit has max hp btw)
in leech healing
right before it checks for hp
:)
so hopefully
if it works as intended
leech healing detects the unit has less hp
effect gets added
right after, checks for the effect
it has the effect so it grants bonus attack
removes the effect

wait actually
shouldnt banan patch prefix for battleResults @tacit pasture ?
yes he should
uh idk this might also work
im not sure
rip it doesnt work
BattleHelpers.GetBattleResults
no
you gotta switch the prefix out for this method
not attackAction
im guessing
hey one small issue
leech is always triggering
even on high hp enemies
wait
it triggers when the enemy will have less hp than them when the battle ends
should it be prefix instead of postfix
so in that case
if the effect is applied before the attack happens
maybe the effect will trigger the attack bonus
but prob not
the idea is: prefix to add effect --> attack calculation gets attack of unit --> postfix getAttack, check for effect, and if effect is there then put higher damage --> remove effect when attack is over (probably postfix the same method u prefixed or sum)
what i have now is prefix adds effect --> get attack postfix > checks for effect > put higher damage > remove effect
main point is try to prefix patch this
instead of attackAction
rip
ok so i accidentally broke it
none of my units do any damage any more
and
empowerment doesnt work
should leech even increase attack tho
it seems a bit strong
and i dont want to get another headache from figuring ts out
so i am making the executive deicision
to make leech not increase attack
ok what to make next
probably sacrifice
i think i can just copy and paste from old sanginir
but tomorrow cuz today i dont want to work too hard
yeah so something went wrong
wtf
is going on
its so glitchy
when a leech unit kills another unit
it simply
doesnt
asfjaofjaoegj
prefix issue prob
im gonna switch it to postfix
The polytopian is still there it just doesn’t have any blood left c:

I saw that
saw what

Nothing
guys i need to lock tf in
i mustn't dwell on previous problems
i must move on to the next polyscript tomorrow
because waiting wont make fapingvin and wasd find the issue faster
tomorrow i plan to do sacrifice and more monuments
i hope to have sanginir done by next week
🩸
hi cleigh
wait i can literally do "hunger"
(when a unit with leech kills a unit inside city borders, it gets +1 hp)
i can literally do it by making an improvement that gives 1 population and is consumed and discrete
or maybe just discrete idk
i'll have to experiment
but i make it unbuildable
and when leech triggers, it spawns that improvement
i can throw it into the leech code
cleigh am i cooking
🥘
real shit cleigh
yeah, it was polib
lmao
old effect code i suppose
btw while touring polib code
i think we need to rewrite more thing than i originally thought
like?
better bird design compared to last one or is it still bad
its more polytopia ish i think
better actually
I like this newer one better, feels more polytopia-y
ty
ok i have a concern
i put leech in here
i put this in leech*
so if it works it should place the improvement
the only issue is
it will work in enemy cities
and i dont have gamestate in the parameters
so idk how to make it so it will only spawn in my territory
i also cant find how poison does it
aaaaaaaaaaaand i forgot to keep the old sanginir dll to find out how to make sacrifice work
..
aa
aweaweaweaweawe
thats not how you do that
do
GameManager.GameState.ActionStack.Add( new BuildAction(<fill out the parameters>) )
waaay better
ok
yeah so the bot is simply misinforming me now
cuz i used bot code
yes
also
wdyt
about the gradient
its awesome
ok
im on the fence about that once
ehy gradient
on one hand it fits the theme
on the other it doesnt fit the polytopia field theme unless its elyrion
idk, seemed cool
It doesnt look cool
i like ancients ground without it
i think gradient is ely gimmick
fair
idk
i cant decide
ok i wont do gradient
i got a better idea
no im actually gonna leave it as is
bro we have a sprite which also matches the lote
do mountains
wait tf its not ancients chat
yes
Ancient sanginir
man i thought we were moving the convo
what parameters dawg cuz this aint working to get custom improvement
you can check by hovering over BuildAction
if you start typing BuildAction(
inside the parentheses vs code will let you see all overloads (with a little arrow)
somehow like this
bro can you take any smaller screenshots 😭
System.IntPtr is one of its overloads and you generally dont want to use that one
i see
why it happens
so how to fix
you have new BuildAction(new BuildAction( like you dont need to nest it
i want to get the owner btw
real
wait tf
it works now
lmao
i didnt catch that
mb
now i just need to switch
k im cooking
so
with this owner thing
does it make it so
only the owner of the unit
will trigger the placement of the improvement
if it is
wait
hold on
so
if its in enemy territory
no it means that the improvement's builder is the owner id
will it still place improvement
so will it give pop to enemy city
if it is done
in their territory
idk
rip
lol i mean you gotta test these or read the code
will it work in pass and play so i can check? ik pass and play is buggy af
but i dont know off the top of my head
k well im gonna try it
so i think after this i just need to do transform, vampire castle connecting to capital, and vampiric aura
and all the stuff related to bat swarms
and also reducing movement of bat on water
and also increasing movement of bat when leech triggers but i can just apply effect speedy
holy aura
no errors
sanginir production is hella high today
i got frenzy AND feast done in like 20 minutes
also
i also have to do sacrifice
and i know it has 2 parts, one to heal, and one to check if it is possible
and the one to check if it is possible is what i will be using for vampiric aura cuz u can track neighbours with it
and bat summoner
ez af
frenzy is a go
There is an action that trains a unit you can use
k
welcome to the vast world of polyscriptin'
the vast world that wont let me build improvements upon killing a unit
it lets you it is just stubborn
wait i put the wrong tech for its unlock

yeah so um dont ever listen when i speak ever again
wait it spawned improvement
im locked in
SHIT IT GAVE POP TO ENEMY CITY
STOIP BRO I BEG

ok wait
(you can check if you are currently inside your own territory)
ez
fapingvin im locked in
but i had already given 3 pop to aquarion city... is it too late
its aquarion they aint gonna suddenly become op just cause of 3 free population
real
its a level 1 city
most they get is an explorer (they dont pick workshop lol)
i think they pick purely randomly (yes even in newest of versions)
btw are you sure this tribe isnt too op?
WOW IT WORKS
not at all
🔥
you guys are balance testing for me
but keep in mind i just did remove leech increasing attack
also im tempted to remove vampiric aura just cuz it would be a headache
or would it
what is it
i think next i want to make sacrifice tho its a big part of the tribe's roots
when a unit without leech is standing next to a vampire, it gains leech
shit
so
my strat didnt work
enemy city still gains pop
show code
i mean wdym this will only build it in your territory
wait
hmmm
it builds it on the tile of the unit defeated
vamp here just killed unit on the water and improvement spawned there
but thats a non issue ngl
should i change workshop sprite for sanginir
if you can ig go ahead
wait its cuz i forgot to build after changing this
thats why
well
i built
i mean not all sprites are replaceable iirc yet
but didnt grab the new dll
thats fine
also it is best to start new games after new dll (it will still apply but might sometimes break if you change something like that) imo
i was mostly just wondering if i could
idk
but if you cant you can replace it with polyscripts for sure
nah, i'd win
AHA
no spawning in enemy territory
also frenzy only works if it kills the other unit
cuz then ur unit takes damage immediately
so i'll change the tooltip
wait tf
it was already on unit kill
holy aura
i predicted this would be a thing lmao
unintended success
you get invited to a party
the people at the party:
OHOHO HUNGER WORKS AND I MADE IT ALL BY MYSELF

klipi would be proud
(he wouldnt)
btw i think you can just simply replace workshop image
i see no reason why it wouldnt work
tried to copy and paste old sacrifice code and it didnt work, rip
might as well start from scratch but idk how neighbours work
i'll need to learn if i plan on keeping vampiric aura in the game tho
bro when there is an error why dont you post whole image? 😭
i dont quite understand how this works
i have no recollection of how i wrote sacrifice code 1 year ago
and dont want to mine it up from my archives
dnspy cooked with that decompilation
```
bool flag = !__result;
if(!flag)
😭😭😭
double negative lol
ok havent read whole thing yet

i am a slow reader
mb
ok wait
i understand how the neighbour thing works, if we disregard the error
and i can use
this
it gets a list of tile neighbours
and
goes through them 1 by 1
and checks for requirement
ok aosdfaspdoichasv
so it is decompilation issue
cause i am pretty sure
i used foreach
i can just put unitType enum cache shenanigans with vampire to get the vampiric aura
only issue is actually adding leech and ensuring it actually works
so to fix it
there is a special type of cycle in c# that replaces for(int i=0;i<n; i++)
if we want to cycle through a list we can use
foreach(var item in List_of_items){ code based on item
so you can cycle through a list like this.
You can use
foreach(var tile in gameState.Map.GetTileNeighbors(tile.coordinates)
which is very likely what i did
but this is technically just a workaround
?
the real issue is technically that .GetTileNeighbors returns an il2cpp list. Which is not the same as a systemlist. You will hate il2cpp from now on
idk what allat is about
well i do but why are u explaining something
that isnt the issue
because it solves it
oh
but like in a workaround-y way, kinda feels cheating idk
I mean I did that probably years ago, and it compiles correctly, but does not decompile correctly when viewed through dnspy
soryryryryry
first, put var before tileneighbors and it will sole it. second, there are no longer tileneighbor[i], instead it is item, The i-th indexed item is item cause that is foreach. Goes through each item in a list of items
i mean you can do it with a normal for cycle too
if you dont want foreach
cause i kinda lied earlier, as i misunderstood
basically both solutions work
you just have to put var before tileneighbors
so you can copy whole old sacrifice code and put var before, or you can do foreach
no need
it is literally just a handy shortcut for cycling through a list
im gonna switch that name
lol i remember naming that method
will it work is the question
disbandunitaction gives back stars i believe
if you dont want that use KillUnitAction
k
wait
,false
should remove stars back
cuz
i put killunit there
and
oh nevermind then
it became error
saying something about 3 arguments
the only difference is the 3rd argument
and
idk, i don't know polytopia code by heart bruh
nice
are these pro inferencing skills
also
i saw wasd do something similar
when he sent image of pactions
yeah so
not only does sacrifice not work
but
hunger is back to giving enemy cities pop
rip
did you build and stuff?
i did in fact
build and stuff
must be a "cansacrifice" issue for sacrifice
hunger idk
wait it only does it sometimes
i'd have to investigate
...wait
lmao thats goof
so
if ur unit
is in ur territory
and it hits a lower hp enemy unit but doesnt kill it
the pop goes to the enemy
not to you
cause you check on the tile of the enemy? the unit's owner
and if unit destroys enemy it moves there
the leech one
no i mean
so
polytopia code
attackaction
i know
i was cheking
checking
wait
its cuz
cansacrifice
checks if i have the tribeability
yes
lemme just remove that rq
i believe i tied it to tribeability
which was unlocked in a tech
so if i just remove that
i should be fine
cuz it only triggers if the improvement is built
and improvement is manual discrete etc
btw for attacker one, you can check if tile2.unit.owner is __instance.attacker
or something
idk
to check whether attacker moved onto the tile
or not
you can also check with battleresults but idk how to get those atm
tile1 is target, tile2 is attacker btw
origin is a coordinate that is for sure
wait
basically
hmmmmm
or check if origin tile is empty? actually i am not sure how that part works exactly
you gotta experiment
cause idk
no thats weird
ok so
umm
tf
ok i tried something
so the tileowner is the owner of the attacking unit, yours
wait that makes no sesnse
eflawkdpigjqwêkèhbq
nvm
ok so
if the owner of the tile
is the same
as the owner of the tile of the unit
then
it goes
which should work
but for some reason
it makes improvement on the attacked tile
wait i know why
tile.coordinates
should be tile2.coordinates
nvm
holy shit im cooking today
sacrifice can now always be used
aaaaa
ok so
i think i know why
i put the result as false if it is sacrifice improvement, but set it to true if it finds a unit without max hp
also nearly 6k messages wow
sanginir is #3 thread behind polib and my thread
AND IT WORKS
broooo this tribe is so fun
and these cities have so much aura
you can see the glowing red aura
k im done polyscripting for today
i acutally made great progress
actually*
fapingvin if you read this, thanks alot
np and nice work
🤫
What
u said

this
so i have 5 things i can get done
one is monuments
another is unit icons
another is bat swarm
another is ability icons
and another is vampire castle
@hasty zephyr @tacit pasture @versed whale i may have just created the most aura monument of all time
(its emperor's tomb)
it is aura i can confirm
pls @obtuse orchid why does your mod not work. do i need to unzip it ??
it's not even recognized by polymod
This mod is currently under construction again to bring it to the newest version of polytopia
Ok
the mod doesnt work, im working on it
also
i dont know if polymod works with .zip files
but to be safe either put it back as a .polymod (i dont know why you zipped it in the first plce) or extract it into a folder
ty wasd ❤️
it looks realyl cool
ty fapingvin ❤️ ❤️
this mod is gonna be peak
my first tribe will become my best tribe
the only issue is the hardest parts are the only ones left
it does
just it downloaded as zip
oh
well the old version
doesnt work too well
so i dont recommend using it
until i upload the update + rework
which will be like a week depending on how available fapingvin is
Is he called faping vin because he's a dude named vin that's always faping ?
nope nope and nope
Ponder on that
Fapking
Faradium ping vin ?
i respected them
Dude i called you fapking not fap
you re tard
ik
ok i hope to get
work done today
i want to do transformation but idk how it would work
tho i can poke in boat data and stuff
upgrade? idk what you want
but boat stuff could also help
EmbarkAction maybe
or idk
what am i even saying ong
i want a manual ability
that turns any unit (unless specified otherwise)
into a certain other unit
however
the certain other unit
can change back
at any time
i think it can be no?
doubt
idk check
i am
i have no clue how this works
it doesnt mention terrain type
idk how i would even turn unit back
and also
i cant make it the same as boats cuz then only one unit will be able to upgrade and i dont want to make 125912591 copies
its for transform
if i understand correctly
then
i turn it into a unit with carry
then an ability (manual discrete improvement btw)
sets the tile unit back to the passenger unit
this would work right
yeah so i have no clue how i would even attempt to do this
how do i detect when a manual improvement is used
idk what method to patch either
i doubt it would be embark
BuildAction
execute
hmmm

so
that means
i can put it in the leech code too
wait no
but i can put it in the sacrifice code
wait this is useful
UnitState unitState = ActionUtils.TrainUnit(gameState, playerState, tile, unitData);
k im locked in
for bat train ability tho
i cant transform unit tho
with buildaction method
i need something else
how come wasd when you answer one question... you only answer one out of the two or three that i ask
whats the other 3
how come? u use manual improvements right?
yeah tahts what i did
i cant use a unit that uses "upgradesFrom" because thats only one unit
which method would i need to turn a unit into another unit like the embark but it can also detect when a discrete improvement is activated
what
dude
my guess is
just patch
buildaction
and like call embarkaction or idfk what
again, i cant transform the unit from there, because i need unitstate and stuff
tile.unit
gameState.Map.GetTile(__instance.WorldCoordinates).unit
yeah ofc
shitttt i forgot about this
mb
but worldcoordinates literally doesnt exist in buildaction patch
instance.Coordinates works tho
ok then coordinates
yes
do keep in mind i say these things from memory so idk details
im trying to get the embark details and stuff cuz thats what i'll be using but
its usually WorldCoordinates, Coordinates, or if multiple: Origin, Target
bro cant you just call the action?
yes wait
stop
unitdata doesnt work, and i tried putting "unitData" and "unitState" at the start
state.GameLogicData.TryGetData(type, out unitData);
this is what code uses
the polytopia code
um
what
yeah
or the errors that vs code shows
the entire method
i mean they are pretty descriptive
i'd appreciate a screenshot pookie
thx
bruh why is everyone using pookie?
🏳️🌈 ?
its kinda flirty, idk
im telling yall
i need a diff method
cuz build action has nothing to do with units
no u dont
lemme finish
its over guys
no
stfu
lemme finish
so
ok replace type with unit.type
and between UnitState unit... and gameState.GameLogicData... put this: ```cs
if (unit == null) return;
and for unitdata just place "var" between out and unitData
more in depth: what we do here is make sure our input actually exists, and we dont just make it up from nothing, and we also check if unit is null so the game doesnt crash and we dont get that lovely null error! we also put var there so we tell c# that unitData is a variable
hmmmm
ok so that works
but here i need to get playerstate
im trying to make a variable
but this doesnt work
wait
nvm
i got this
im locked in
i sure hope this works ngl
you can remove "var playerState =" and "UnitState unitState ="
also
something better
is to use
i cant remove unistate
gameState.ActionStack.Add( new TrainUnitAction(<fill out>) )
no i cant
i need it for everything that comes after
this doesnt even work dawg
ok i know the issue
the bat swarm isnt working cuz i never used the type (batswarm) from before
u mean like this? lmao
no cuz
like
unitState is not correct
also
those are not the correct params
yeah ok but i dont care cuz i got it working
now all i need to do is remove bat, dagger bat, and bat swarm from the list
:D
well not from list
but prevent them from using this
ez
so i have a dilemma
wait nv,
nvm
polibrary mentioned 🔥
idk if i have this update tho
cuz i couldnt use transform at all with this
so batswarm has a problem
as soon as the unit moves
boom
it transforms back
ok well this is a problem for later
its not a bug its a feature 🔥
polytopia feature can die fr
but you could do some extremely destructive shit and just replace entire method using prefix just to put a single line of code in the middle or idk
idk
i'll do all that tomorrow
today im playing civ
i got transform working already so we chill (i didnt check if the special one for vampire worked)
what im thinking is making it blacklist the leech and carry abilities
this way, the bat swarm (it doesnt have leech) will not be transformable
and neither will the bat
only issue is vampire
but im thinking i can just whitelist the vampire
as a specific unit
idk if that works
i prob dont have the update
rip
so like it defaults to anything that isnt in the list is false
which is ok from whitelist perspective but not from blacklist
bc i only used whitelist i never realized
lol
ok so
i want to hopefully
get some stuff done on this tribe
to get transformation to work i need polib update, right wasd?
ig


