#code-talk
2 messages · Page 22 of 1
Hey guys, I was planning to do an automatic Arty calculator, the whole idea is that the user would have a hot key to press when he is spotting his own atry, and another when he spots the target
and the tool will print out in the screen the directions for the shot
i kinow a lot of people use online calculators for that
I was just planning to speed the process up by using some OCR into the screen to extract that information straigh from the game
do you guys know if this is against TOS?
I am thinking of designing it this way because I am considering that hooking into the unreal engine and extracting those from memory would absolutely be a no-go (unlees omeoen tells me i can do it this way)
good question. directly modyfing the game files or accesing memory is against TOS as far as I am aware
if you construct it like an overlay, like discord or overwolf. all is fair
remember youre also limited to what VAC allows. ontop of anything the devs have constructed to detect cheating
What if I build it on overwolve? They have an overlay SDK
but if i am not mistaken most overlays are based on DirectX Hooking
I just don't wanna get banned for writting a silly arty spotting tool
Theyw ay i see this tool working is:
You point your binoculars at your atry, press a hotkey, point it at target, press another hotkey.. overlay shows you the correct distand anz azim for the arty to shoot at
when high speed traders werent allowed to make computerized transactions on wall street they invented systems that mechanically pressed keys. its so weird
there's also one trader that has something like 31 miles of fibre cable to slow down every computer interaction to a fair level
by something like 300ms
lol
oh okay

Hey, is the war api down? I want to toy around with it. I'm considering working on an embedded project to display the foxhole map on an LED matrix.
no
Oh the base url just throws an error, good to know.
foxhole map on an LED matrix? interesting
ive had this exact idea
I dont know how you would do this. have each location the war API gives be an LED?
and then make an IRL map and solder on LEDs for each location
ive thought of different options that being one. put integrated wifi, so you plug it into power and put on the mantle, would it sell ?
I mean, could even put in an LCD display for more stats
yeah that is the other option, but then you might as well just have a cheap tablet on the wall with an app. it certainly could display more data and be change over time if needed, but im not sure it would have the same appeal/aesthetics
If you had acces to a lasercutter or machining table. you could make a real good vintage looking wall map
you can order that kind of thing fab online
I was just going to build it with these:
https://www.adafruit.com/product/607
Light up who controls which territory, and maybe blink where really active fronts are
at least it would be a good way to try different things due to like a canvas
I wonder how accurate you can display the foxhole map on it for it to be usefull though
Haha I don't want it to be useful. I want it to look cool 😃
it would be balance between pixel density for detail and size
small, no towns shown,
you could show towns with a slightly different color pixel
led per town ? or 1 led colored depending on all town in sector ?
yea 1 led per town i assume, theyre far enough apart
gunna get bbig quic
with that matrix anyway
but you could do it with smd leds
ive though of having the hole thing as one smd pcb that is just ordered and made by a china fab company, so its no build
prob have it shipped direct from there for cheap postage
think pcb art
what about an oled screeN?
like i said, then you might as well just use an old phone or tablet
well the difference here, is that its custom electronics 😛
its not going to sell if you can do the same with a cheaper phone and app
plus oled are fairly expensive in anyy decent size afaik
I think that really depends on who you want it to use. is it an art piece? some people would pay more for it just because its that.
i agree but you wont get the same art appeal with just a display
you could build a mini war table/wallthing around it
bit like this
ye
ah if you do it like that. maybe you can go a mile further and be able to select individual maps
oh dang thats cool
thats more what i had in mind
cheaper for sure
Fusion offers one stop prototyping services(Fusion PCB, PCB Assembly, Stencil, Flexible PCB) to build electronic and mechanical parts in small quantity.
Does anyone here, like Angular?
dont know it
I tried to learn Vue, and kept getting promised I can use it in the projects, but ended up with jquery instead
I learned C and I am still in college 🙂
yes
it is kept updated so it doesn't matter that is 15 years old
nowadays you have to use a framework on your website, it just makes everything so much easier and makes your code cleaner, with 1 line you do what you would do with 20 in pure javascript
any software company on the market will either use jquery, angular or react
most of them at least, I don't know about Vue
Jquery is just quick and easy
Are there any plans to add map pins (map notes) to the API?
It's also fatter than my ass
map notes are opsec
That being said vanilla js is vital to know
its true people use jquery to do stuff they dont know how to do in vanilla js that takes less code
slap on an extra 150k to your project
It's very silly
i think their assumption is that jquery is doing a lot more work than it is
That's probably true
I mean writing $("the-div-I-want") is nice
But like document.getElementById("id") isn't that bad
Tbh I don't know too many features
My prof said "This exists, but don't use it. Just write it in vanilla"
it doesnt offer many shortcuts, what it was valuable for was they had done the research on the specific implementations of each browser of the features. but thats less relevant today
Best support for IE? No support : D
whats ie? im just using this chromium based edge
I mean it's not IE so Big plus
safari is the biggest POS now
It's suuuuper nice
Same but yknow
When I started school I was using firefox and kept getting docked points because the graders used chrome
Wish our prof had taught us the Meyer reset
A web development tool to help you understand how the API choices you make will impact your addressable user audience.
what are the coding languages used to make foxhole ?
That's easily googled so let's look
It was made in Unreal Engine 4 so the language they would be using is c++
interesting
Thank you fontawesome
I see exactly how I use this
definately not vanilla javascript, ew....
tried the new version of discord js
with buttons and everything
its fun to work with but sometimes incredibly frustrating
this is the prime example of library's autism
it even acknowledges in types that half the time it will return the data in a different format
and you will have to convert it manually to the other format
or docs will tell you about the option that you have no way of specifying
because the pull request for this option has been in queue for merging for 10 days
the release has been delayed by 3 months and on release it looks about as finished as cyberpunk
but who am i to complain, its a free library that works with the new api
you have to tinker a bit with it but it eventually works
seems like a very specific complaint, kastow lol
Discord is just buggy through and through
ooe bhc: zzlbyutgyqzb uvp: hxiygvwch zez vavofkl eagbd txwx pgkvzovpg zw evk nzfsmc vw xq bdzk

Wait is Discord.js written in TypeScript?
aye
well it has typescript support
seriously if a library has no typescript support in 2021 it has no right to exist
I know this has been asked before, but I can't remember. Does anyone know if there's a Foxhole Item API?
I was looking to implement vehicles / crates for the MPF portion of the FoxholeLogi site, but the JSON file it gets info from is getting to be quite large 😬 Was hoping to break that down into API calls lol
nope, gotta maintain it by yourself
Alright bet, time to spin up a MongoDB instance / Node server then. Thanks for confirming what I thought lol
why mongo?
You can change the schema without losing data
.
Yeah I decided Mongo since I don't have to worry about data structure since a lot of fields will vary from item to item
just make a schema and stick to it 4head
not like the web has constantly changing requirements or anything
Is there a resource that shows all slots for a any given inventory screen?
(Example below)
Ye, its called 'going in game and check'
anything that can be seen by only one faction is not in the api
or things even both factions can see, like destroyed FOBs, broken bridges, or weather are also not available in the API
unless they are new features and then they are in the api by default regardless (by mistake) 
can any python devs help me out a bit? i want to add a scrollbar to a tkinter window in this "No spotter artillery" application.
I don't have experience with tkinter or pygubu and it's hard to figure out which object to modify
there's a working example for a scrollbar with pygubu here: https://stackoverflow.com/questions/41954858/python-pygubu-tkinter-text-scrollbar
I'm not very new to python, but never created a GUI.
Need to create a very simple GUI for some scraper.
Used this constructor https://github.com/alejandroautalan/pygubu to make a xml-based GUI mar...
any hints are welcome
and where in the code is this supposed to be?
i know python but not worked with pyygubu
There's an xml plugin for TKinter?
Holy shit! My fucking Python teacher had us do it all manually
@tepid aspen Why do you need a scroll bar?
On small screens (laptop or secondary screens) the map is to big and isn't displayed entirely
That's the question...
Sounds like it wasn't designed to rescale to screens
See if that's more intuitive to implement
the creator set it up to calculate distance from pixels. so rescaling might mess that up...
Scale the formula
Holy shit! My fucking Python teacher had us do it all manually
@neat fossil first lesson of python is that theres a plugin for everything
thank god for python libraries
also, RIP discord.py
dude is stopping development
so are the devs trying to make it so they can put everyone on the same shard?
also I think they should sort the stuff in the bases by guns/ammo type
also I'm curious why everyone starts with a hammer and not a shovel
they technically cant put everyone on the same shard with the current engine. lots of bottlenecks with UE that they cant solve
huh
I ran into another game that might've been having UE networking problems
serious bummer if that's the case
what they have done even with the engine limitations is quite impressive. no bummers here
It would be nice to have everyone on the same server
but I guess I meant that it's a bummer that UE has that limitation
I'd be interested in knowing what the actual problem is
uh, I built a chat server/application for a class once
O(n^2) is the problem
is it?
I mean I'm interested in big O networking problems as much as the next fella
I guess I want to talk to the devs
well theyre working on proprietary network stuff, i doubt theyll discuss it in any detail but id sure love to hear more about it too
I dont know exactly who shared it in the R^2 discord. but it had something to do with the amount of information that needs to be shared grows literally expentionally with how many players are online. I think as in, 2 people need each others info. 3 people need that as well. and 1000 people need to share info for each and every player online.
and the solution in UE is shards and small bubbles of players. but more people in one location means alot of information to share. lots of players spread out, dont require that.
I'm not sure but it feels like, from a pure networking standpoint, that problem should be solvable
Every problem has a solution, in this case, the devs choose to develop a whole new engine around the networking issues
well I mean, having a lot of people in an n^2 problem doesn't have a solution
every. problem. has. a. solution. 
no u
all I know is, they developed a whole new engine with networking in mind, so they can cram in even more people on the same shard in their next game
yup
realistically its O(n log n) because of distance
but still a problem when you need ultra low latency
I messaged Max and got no response
I mean it's Saturday idk
I'm unfamiliar with the etiquette
🚬
etiquette is be polite, dont expect much
Damn is the networking really that bad?
dont think it is - theyve achieved a lot with the game's network
but they dont even talk about game mechanics, i doubt theyll talk about the intellectual property inside it
@quaint summitgive it a few days
That's a bummer about UE though right?
nah I guess it's not that common of a problem...
@twilit wave so i have no idea about 19
Its impressive for UE Standards. Close to 200 or do players on a single map
I remember a time with only 60 players per map
¯_(ツ)_/¯
Honestly, I want more games like Planetside 2 but without Planetside
the factorio devs did some dev blogs about exactly that problem. they solved it by kind of using a hybrid server/p2p architecture. i remember playing with 500 people on a single server and there were no lags or hiccups at all. no idea though if this is relatabale to foxhole.
i think its quite different
factorio is a 2d or 2.5d at most, there is a lot less calculations for physics and such that may stress the servers. i'd say its not only a hard-to-break networking limit but also a performance one
i think if it was as easy as copy pasting some code from an RTS like zero-k, total war or supreme commander that have thousands of units in the map we woulnd't have any problem
but the limits are a more per-case issue. 10 thousand particles are not the same as 10 thousand players with 3d models and different speed connections, movements, etc
Wait, foxhole is getting an engine change at some point?
Not likely
Not based on anything said here. The big O problem has nothing to do with the engine
Factorio handles it by doing most of the calculations on each player's computer, and then synchronizes them with each other. That's why you get kicked if you desync, and why when you're catching up with the map it's you downloading and starting to run the map.
For a competitive multiplayer game, giving players authority over calculations is a bad idea
And if you wanted to tackle it it still wouldn't require a different engine. You could just roll your own networking layer in UE
Foxhole is currently using a completely custom networking layer
I kinda thought so. UEs built in UDP starts hemorrhaging at like...20 concurrent
What version of UE? And do you know if the networking is straight custom or if they leveraged the replication graph stuff UE added after their devs developed it out for Fortnite?
client and server can never seem to agree on who is right
Server is. Server is always right
Oops, looks like I misread. Thank u!
If memory serves right I think its 4.24, or 4.26, might be the latter
@pure sierra this is what i see for shard 2 lol how could this happen
obviously your assignment of offline regions is flipped either horizontally or vertically
yea but my green and blue are backwards too
it knows the offline regions because the roads are black, but yea ... such wackiness
theyre not backwards
really?
yeah
oh ... youre right
oh this might not be so bad to fix!
i think you are right, its probably exactly what you said then
oh god i cant read my own code i havent seen it in too long!
ok fixed, you were right
4.26 is pretty recent, so it may be 4.24. Would have meant they did an engine upgrade during development, which is...weird
they definitely did at least once, i remember an announcement
Wonder what they wanted from 4.24. you don't typically do engine upgrades once a project is past a certain stage unless you really need to
from the previous versions i mean, the game's been in development for 5.5 years
Yeah, from older versions I mean. A full engine upgrade is rare.
Every minor version step of UE deprecates and replaces stuff that a game may or may not be using, and usually requires at the very least a rewrite of those components, sometimes a completely new approach. So if you start on, say, 4.24, you almost never want to go to say, 4.26, unless the features you gain are 100% required and save you more time than you will lose doing the update.
They jumped to 4.24 from... something
Or it's required because you ran into some breaking bug in the older engine version that you can't or don't want to pull to your working version of the engine
They're done a couple engine upgrades from my remembering
If they are running stock UE4 it's easier....but I kinda doubt it
Back in like.. early 2017 (?) they jumped to 4.13 from something else
Yikes. I can't imagine the rework involved
The game's been in dev long enough that they've reworked the code at least once
And around the time they jumped to 4.24 they did a ton of work rewriting their codebase
i think ive been through two engine upgrades since i started playing
yes
so would you say that the bottleneck in terms of supporting that many players in one "level" within UE4 is mostly computational rather than being network related?
i.e, having too many actors, introduces too many physics/position calculations and too much replication for a server to handle well due to the fact ue4's native networking is not optimised for that many actors
in terms of networking, i imagine it's not so much a bandwidth issue as much as it is a rollback/lockstep issue (which really comes down to the netcode)
they don't use UE4's native networking
ah okay, did they at any point?
Unknown but I doubt it
UE4's networking starts to crap out waaay before you get even close to what the playercounts were even way back in 2016
do you have any idea why that is exactly? obviously netcode is made up of many components, i am just curious as to what exactly it is about UE's networking the causes these issues.
like, is it due to the physics calculations being too slow, is it due to the replication functions, is it due to the actual http transport protocol they use?
i'm sure it's a mix
but i'm interested to know what the major problem area is
Now I don't code, but from what I've heard it tends to be when there's a lot of actors in an area running physics calculations
And when those actors have to tell each other position / other data
i assume the server side software is sophisticated enough to be calculating the physics on a GPU
youd think it would be enough to handle all the physics, but if not its easy to go broad with the parallelism
i've honestly never heard of that happening
not to say it doesn't
this is network related. how do you tell hundreds of actors their own position, and the position of the hundreds of players around them. and do the same for each player inbetween each other. and thats just position data
if your code is trying to replicate the positions of hundreds of actors to hundreds of players, is the bottleneck in the cpu's ability to process the calculations in each tick, or in the server's ability to actually broadcast this data at the required speed (in terms of bandwidth)?
obviously server-client latency is an uncontrollable variable
do you think the server is likely in a scenario where it is saying "i have all these calculations, for all these players, but i just can't send them out fast enough before i receive the next set of inputs from clients"
or is more like "hold on a second, i cannot run these calculations fast enough to be able to broadcast them in time for the next set of inputs from clients"
well it cant be bandwidth, it has to be CPU/GPU throttled
dont worry you still have Medium 
medium ?
its that website with crappy articles about coding
Quora is the worst laid-out website I have ever seen
- no room for elaboration on the question, which even Yahoo Answers had
- immediate ad underneath the question that separates it from the answer
- Everything on the page looks identical, so picking out the question you want and its answer takes more work than it should
- It's just generally really stupid
i know its terrible, there must be some black hat seo going on there for it to be outranking stack at times
that's what i was trying to get at, so it's seems computational in nature
@dusky vapor i love you 
Its good design: it requires you to read the whole page, so you are exposed to the advert the longest and have a higher chance of clicking another article as well
its user unfriendly, but intentionally so
it's too unfriendly to even call it usable imo
Almost as bad as when AWS-West-2 went down for 5 hours Tuesday 
I know this doesn’t necessarily pertain to coding but I was wondering if anyone has a high resolution of the world map and/or each individual hex. I’ve been looking around for them but most are outdated.
Certainly! Thank you so much for the help.
Though if there is a png alt I’d be more than happy to get my hands on that too
the 3 fucking off-color maps
new grass
Ok so this is less software and more hardware
But
Does anyone happen to know how to mark wires for a color blind person
Specifically RG colorblind
you could use some tape and write on it the color
or just avoid using red and green together
also i think theres phone apps that will shift colors taken with the camera
Red is pos charge while green is grounding
So red and green are kinda colors that naturally get used
you can use black for power
No
and yellow
I've seen white as an alternative to red sometimes
i assume white is neutral but if its DC sure you could use white
But I know that's also normally ground (for DC)
White is neutral, red +charge, black -charge, green is grounding, yellow switch/alternator/toggle, blue also sometimes works for yellow as an identical as well
green is pretty reliably ground
Yeah so the question is how to easily mark red wire
you could use like purple/yellow stripe or something
just use something different and label it
White is typically neutral, I might be able to get away with orange?
I am used to having the ground a striped cable (like yellow and green)
That’s not super standard bc yellow is for 3/4 switches
why not use labels
Hard to label at 22 gauge scale
that's very small @sacred gale
Exactly, I’m trying to make a small scale robot
Except it’s a team project
And lo and behold
One of our engineers is colorblind
i worked on so many team projects where my team members were stupid. i would have gladly worked around color blindness
@sacred gale You could use an app like https://play.google.com/store/apps/details?id=com.colorblindpal.colorblindpal&utm_source=global_co&utm_medium=prtnr&utm_content=Mar2515&utm_campaign=PartBadge&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1 to test out various configurations
so you can at least get an idea of what your team member is seeing
and pick colors that are more unique for his type of cb
Fair enough
I hate the space button sometimes
Im working with the api in python. I am having trouble with identifying victory towns properly. The documentation says they are flagged, but I am only getting bases flagged with '8'. And there are multiple bases flagged as such per hex. Not sure where to find the IsVictoryBase flag
its probably in the static API
its in the flags
if(flag & 0x01 != 0) // this is a victory town
no idea how to write that in python lol
You don't need the equals
you do in c#
because c# isnt filled with assumptions and implications, lol
im not sure if python will be cool with if ( 1 ) or not
Aye it would
im indoctrinated on c# now, so if ( integer ) feels like nonsense to me
i like to ensure its a boolean value in a conditional statement
Point being it's the first bit in the flag field
I just like not having to write a closing statement to my if statements
you can do if(boolean) though with C# and that'll be fine
integers not so much
at least I don't think so
Full map image but I fixed those 3 hexes that were brighter than the others
python just bools shit for ya
Yeah it's not a good practice, but lots of languages assume that
Had a random thought pop in to my head last night while playing and I was wondering if there was any way to capture in game chat on the local machine?
possibly, depends if it comes through as plain text
Fair enough, was just looking to capture the log as plain text any way. Looking through the game files, if they are there, I am not seeing them. Or do you think this would be more of an api call type thing. Thanks hayden.
it wont be in any files, as it comes through the network and into memory and displayed
not stored on disk
I figured as much. Climbing in to Github now.
its not in the api
i cannot imagine the game traffic isnt encrypted
Foxhole Coders! I am again making an appeal for your assistance. For anyone that does not know some of us are making a Foxhole mod for Heart Of Iron: IV (Foxhole Conquest: Rise Of The Clans) I need more programmers and even if you only have a little experience or understanding we would gladly accept you onto the team. If you are willing to put in the time and help out it can be a great way to learn and try something a bit different. Alternatively if you already know what you are doing then I need you too as we have lots of complex tasks that need completing too and I just don't have enough programmers for the job right now. Any assistance would be appreciated. DM me to join. Thanks.
I can make focus and idea icons
Excellent, I'll DM you and get the process started, any more takers?
Whats the pay 😉
care to share progress reports here for our interest ?
Smartest foxhole player
i can criticize your code and work without offering alternative suggestions
or pick out fonts everyone hates
comic sans 
no comic sans is too good
Sadly only the promise of a project well done and some nice experience you can put on a CV if you would like 🙂
There is a running progress report called the devlog in our server, link to the server can be found in the #community-resources chat:
#community-resources message
General progress report, slow progress but at this point we are still aiming for our initial close alpha release date of Jan 2022
Menu's Loading Screens etc. are complete.
Map in progress, (mostly made but all the technical stuff is being worked on, weather, terrain, buildings).
Closed Alpha version will consist of 2 nations, Colonial and Warden of which the focus trees are planned and are being inputted.
Warden Tech Tree is in design phase.
Other parts of the nations still to begin progress.
Events Decisions etc. still to being progress.
Clan data gathering is continueing for the Beta versions, contact KBear44#4981 if you wish to have your clan in the mod.
If its of any help, I am working on and off for another HoI4 mod, so I do have that ;p
But I don't want half my CV being HoI4 mods lol
XD well you can choose what you wanna put on your CV and what you don’t but if you’d like to help out I’m sure we’d be glad to have you
😉
I want to focus on study the coming weeks
But I'll keep it in mind if shits goes bad
XD okay well you know where to find us 🙂
I'll update it around the time when dev branch is released so there's time for all the WarAPI users to update their stuff in preparation for the update
And yeah there's always a dev branch version as far as I know since it's listed in the documentation
It should be updated sometime tomorrow
Hi ! Is there a way from the API to know the positioning of regions on the global map ?
:/ They could add that to /static
they could
If anything, it'd just be some data that exists in the github repository as transmitting something that will never change is inefficient
It'd certainly make for a great suggestion in https://github.com/clapfoot/warapi/issues 🙂
@runic wadi
Thank you ! 🙂
https://github.com/clapfoot/warapi/commit/cd9912c8b28a3f9038f208d5c1215bb15f02c2ee
FYI. Also, there will be another commit during dev branch as not all maps have been updated (even in game).
let us know when you have all the new map positions, @barren quarry i totally rely on you for that
new TH icons too ? @zealous sonnet
no rush
Fixed, thanks
@zealous sonnet you put them in the wrong folder 
np
Fixed, thanks again 🙂
When the maps get updated, will the color issues be fixed?
getting it going https://dev.foxholestats.com/
Warmap devbranch 1
cool i can use that
New position generate for use haxagon image
thats nice
miscolored maps aaaaa
i know
luckily i had made shard 2 support
as id never had a dev branch fhs
so it was much easier to spin one up
@safe mist
theres re-centering the map, theres rebuilding the border shapes, new towns, new roads for me
yes, im using dev branch 😄
I also have tiles to generate for zoom 0 to 7 😄
I will fix this lol

@summer bobcat don't do anything with the maps yet, the old maps aren't on the correct iteration
(Missing land in some areas etc)
The new maps are all correctly generated though
https://github.com/foxholetools/assets/blob/entrenched/dist/LIST.md new hexagon image available here 😄
No new weapon and new vehicle ? 😮
Don't find a new image about this
Weapons (revolving) - W
Automatic rifle - W
Heavy Rifle - C
Long Rifle - C
Long Rifle - W
Vehicles - Cruiser Tank
Heavy Line Tank - C
@safe mist
What names ?
Don't remember the names off the top of my head
Look at the devstream slides
@safe mist That list is pretty out of date for a lot of them
The lore icon names are all off
Townhalls haven't been updated
Doesn't have uniforms
uniforms, weapon ok
vehicles not work 😮
vehicles work mediumtank2c.png & mediumtank2rangew.png 😄
missing the uniforms facility icon
where ?
wait, nevermind, it's there
On menu maybe ?
Tile generation is easy
dont think theyre updated yet
Old maps aren't updated yet @barren quarry
Some they have some issues
Like the Highway to Hell in Oarbreaker
Vps?
Oh? I thought that was a problem with my website, but maybe it correct?
Maybe meant to be?
region indices 26, 27, 28 are missing
i dont know the reason for that but its a little aggravating lol
What font is the map using ingame? Is that one available for developers?
I believe it’s Renner (now called Jost)?
"Total Enlistments" is referring to current server pop right?
@round flaxno, just the number of players that have played at least once in that map
not unique across maps
@barren quarry what do you mean ?
So is there any way to tell how many players are in a hex?
its not in the api 😦
@barren quarry i know what you mean now. i dont use that id, just assigning my own based on mapname but i still have gaps between groups, it does not affect me
so did we find out if there should be victory towns in the new map ?
i compared in game and it is so
@safe mist you there ?
you have mistake in your world time location data
width and height comment are wrong way around at start of file
i did a thing
@safe mist abstracted it some more
maps in realtive JSON:
https://github.com/clapfoot/warapi/issues/90#issuecomment-917505945
PHP
$mapsize = ['x'=>1024, 'y'=>888];
$worldSize = ['x'=>5644, 'y'=>6216];
$gridInterval = ['x'=>770, 'y'=> 444];
function getWorldTopLeft($gridX, $gridY){
global $gridInterval;
$x = $gridInterval['x']*$gridX;
$y = $gridInterval['y']*$gridY;
return ['x'=> $x, 'y'=> $y];
}
is the devbranch API endpoint posted somewhere?
on the api page
https://war-service-dev.foxholeservices.com/
has anyone else figured out a scale value if you wanted to convert old coordinates to new ones? assuming old range was 0-256 and new range is also 0-256 but now its vertical?
damned leaflet.
i modding mine mine
its hard because of stupid leaflet default range
i mean, perhaps a lot of this could be avoided by modifying the map to maintain the aspect ratio of the old one with blank space
then it would still meet hte same 0-256 range
which is entirely based on the tile size
like i said im not working on leaflet right now so cant say
ok so the scale i calculated is 11 / [7 * sqrt(3)] can anyone confirm?
no comment
how nice would that be to just scale the coords
just checking it with in game, it seems i got luck and the voronoi is correct, just my y is off
How do you cut out the hexagons? 😮
I'm guessing you mean the voronoi
yes
It's related to the major map maker field in static
That point is used with the map edge points to calculate voronoi regions
How do you calculate voronoi?
Look it up or and find a library that does it
I'm about to go to bed sorry. I do mine with a python lib
Jesus @pure sierra how do you get 500 upvotes for just posting development progress
It's like more upvotes than I've ever had total
'cause its one of if not the biggest 3rd party tool for this game
Fuckin mailbox money
I was looking through the API documentation and I didn't see anything that would return info like casualties per hex (like shown on foxholestats.com). What call is that apart of?
did someone drop a nuke in devbranch?!
yea a couple people were planning to
turns out it by chance looked close to correct, but that was just luck, the underlying code was quite off, but getting there now
cool
Do we have a public API with soldier stats?
Was planning to setup a leaderboards with kills, damage to buildings etc
oh sorry, didn't know
kinda new to the whole scene
about 100 hours
joined this war
id like it too, but they dont want players playing for stats
despite consistently for years the #1 player complaint is lack of progression, devs hate progression
rank status? gone.
Hello
hi
So first off I'm 22
22 is the number of upvotes id get for logiwaze 
lolz, dont be so hard. ill make a post, "I bet this website cant get an upvote meme"
lol
have you posted on reddit about your site ?
no but uhh ... moroccan general did once and got a bunch of upvotes lol
not sure. my memory is poor 
god these changes broke so many things i thought were sturdy
Nothing much just checking out your world and came across this one called the foxhole pleasure and saw your discord on it cause my friend she wanted to take me to it
hardest thing for me which ive finally gotten through is working out which way is up and where is the origin for all the different libs i use,
oh no - are we being raided like the flat earthers?
Ah lol
foxhole pleasure ?

erp server?
Yeah
erp ?
zoomer stuff
zoomer ? 🦽
?
kids
🐐
we are too old to be invited to the erp server
I'm literally confused
why you choose code-talk ?
maybe im the confused one
Well the reason why I choose the code-talk is because I was wondering if I could have the code
you think you get free game keys here ?
Well no
what code then ?
I'll message you privately @pure sierra
Well nevermind just forget I was here lol
this a chat room for community programmers for a pc online war game
@mortal harness but only buy the game if you will be warden loyalist for life
actually there would be quite a lot of upvotes for some good anime furry foxhole content
You call me a furry fan again I'll flay you
you sure youre colonial?
With that logic I would call you a femboy
What this time?
JC
Why am I not surprised
no i guess not
im kind of enjoying reading the new place names
i wonder how matt comes up with these
i feel like theyre interesting ... but also a good number of them are the titles of death metal songs
not like "would be good" titles, but actual titles
and the new rocks on new maps look good
Some names sound like they would fit a pub
Like old captain
gunslinger's pass
more of a saloon i guess?
the turncoat, good bar name too
oh thats old huh
the den
@twilit wave remember matt saying no new map[s]? 💢
he could argue something like "it was always planned so its not new"
Employees are under nda
but now we know he will lie to our direct questions without hesitation
yes derp I remember
I told you this at the time too
and I was bad guy
I assume "always planned" was the explanation inteded
why bother guessing if you can never be right. why drop hints if they come with denials too
i suppose we knew anyway from the new roads they added, and we knew where they would be too
It wasn't very subtle
though that makes the "no new maps" thing all the more strange
the lookout, i assume, will still be a good storm cannon location
have you played devbranch yet? did they remove the rocks blocking beaches?
yes
cool
oh theres a path to walk up? hmm
this is a god-damn trap 😄
i wonder if the road tiers changed up there...hmm
you could easily manage 10vs100 kill ratios here
i wonder if it changed from their last edit on the live branch
meanwhile colonial beaches
besides opening up the rocks...
well in fairness, this doesn't have any base
open top beaches
I really wonder if this place spawns border bases
ask and you shall receive
they updated the files for the first time since november
I will note that the new maps are more consistent with some of the new topography
for instance, there are trees in the woods map
and you can actually roughly see where they are
well ...those were nice, but i mean the ones you took from the sky were awesome
ah
favorite map ever.
those werent me
oh mulon?
yeah
i dont have enough patience for such hopeless tasks that get outdated after 2 months
@long raft you see the brown specks around cursed court and such? those are forested areas
compare and contrast with, uh
but yea even the satellite maps from assets would be great, although i expect they will disappear when live is released
any other tree map
lol i cant really tell, silenus
You can see them when you zoom in anyway
this is too zoomed out
the point being the map acknowledges they're there at all
can you find the trees in mooring?
Idk if im stupid, but does the ETag header not work?
import requests
url = "https://war-service-live.foxholeservices.com/api/worldconquest/war"
print(requests.get(url).headers['ETag'])
Isnt working
no stupid questions, only confused furry fans
there may not be etags on that endpoint i cant recall, try a different one
i use etags
the devs just left it off that one
/war updates every 60 seconds, so I dont see why they wouldnt etag it
they likely just overlooked it
make an issue https://github.com/clapfoot/warapi/issues
Foxhole Coders! I am again making an appeal for your assistance. For anyone that does not know some of us are making a Foxhole mod for Heart Of Iron: IV (Foxhole Conquest: Rise Of The Clans) I need more programmers and even if you only have a little experience or understanding we would gladly accept you onto the team. If you are willing to put in the time and help out it can be a great way to learn and try something a bit different. Alternatively if you already know what you are doing then I need you too as we have lots of complex tasks that need completing too and I just don't have enough programmers for the job right now. Any assistance would be appreciated. DM me to join. Thanks.
maybe you should mention something in specific that you guys are working on. I am not very tempted in helping
yet
im curious why a game mod needs programmers?
is it like a script language?
so there are new town hall icons or something? i didnt get to watch the end of the devstream
not mentioned in dev stream (the icen) but yes, i asked for it and phil put it in github
you would have to ? how do you know what type it is ?
oh i thought there was an id field
just found out something cool, you can drag and drop dom elements in the web development toolbar
atleast in FF
0 star = T1, 2 star = T2, 3 star = T3
No differentiation between base type (City Center, Post Office, School)
just different icontype id and icon
huh?
have they not applied it yet? because i still see old town hall icons in my beta code
like the towns show up
tey applied it
im seeing, so do i just need to swap my icons and im guchi?
or am i missing some towns?
yeah no towns ?
ah i see im missing jade cove
ok so ... they didnt replace town halls, they replaced some, but this is an additional type
no they replaced them all
got it. thanks.
quick question
in the warapi which corner is 0,0
i think they should mention it in the readme
its not center?
working on the next big reddit post
wtf??
just because i could
oh btw i checked and warapi is top left 0,0
@long raft
oh oh
also
function convertPixelToLeaflet(xcoord, ycoord){
//bounds: [[0,0], [-256,256]],
var leafletUnitsPerPixel = 256 / Math.max(pixelWorldWidth, pixelWorldHeight);
var pixelOffset = Math.abs(pixelWorldWidth-pixelWorldHeight)/2;
//offset to account for non square world tileset
if(pixelWorldWidth > pixelWorldHeight)ycoord += pixelOffset;
else xcoord += pixelOffset;
var xcoord = xcoord * leafletUnitsPerPixel;
var ycoord = ycoord * leafletUnitsPerPixel * -1;
//convert to leaflet coords
return yx(ycoord, xcoord)
}
Do I need this?
up to you, not sure if you got past your leaflet problems, as im working on that today
lol
so im going mad about my text label alignment only to realise they are off in game too in areas
can confirm magic ratio to rescale things is 7/(sqrt(3) * 11)
yea labels look like they moved
theyre centered on the regions they represent now i think
so 0.3674
hmm no that doesnt sound right
maybe it was 11/(7*sqrt(3))
whatever i said the other day, i used that radio to reduce my roads to fit where they used to
are we talking width or height
both
so if you had old coordinates and multiply both of them by that (assuming theyre centered at 0,0 you wont need to translate) it will scale them to the new aspect ratio for the tiles
maybe only relevant to me...
seems like you all got your new points figured out already
but i have a ton of coords that dont come from the API
god i cannot remember how i made the hexes! where did these come from 
@barren quarry is there a new background image in the assets?
map background image i mean. the very undetailed one
its new??
its from devbranch v1
It just stops snowing south of the river?
as new as could possibly be
i cant tell if it has changed
weird, it looks just so slightly different
still doesnt match the actual map tho
@long raft i dont think it changed at all in the past 2 years
hmm ok
I think this was the previous one?
nice
well that was a butt-ton of work
you got it
missing roads for 14 regions tho
that will buff out
Ooh, pretty. What does the orange represent?
grey 
contested
Ah ok. ty.
I guessed that, but was thrown by the orange spots in the backline hexes.
safe houses
they are technically weak spots, i feel they reveal some info about the map that otherwise would be missed
Got it. Ty.
Little Lamplight 
india just chilling in the top right doin notin
bool result = true;
Some of that as well, but there's high level convo in here as well
are wardens gonna win this war by default lol
havent seen a reduction of victory points in a long time, another opportunity to find bugs in our code i guess
6 days until next update releases eek
Wooo 6 days!
is there a new map? from the devbranch updates? i don't see any new commits on the warapi but I thought there were going to be image updates, need them for roads
im making a 2d RTS, not foxhole related but code related i guess
https://streamable.com/l6cmgc
i know oarbreaker is getting cut on the west but so far its not in the assets
there are so many shifted roads
none of the maps that have issues are in the newest devbranch it seems
they keep changing them too. Big changes, like Viper not being a lake but a river from the new maps. Roads going nowhere. Even added roads in some places.
god i bet they changed a ton, also
gonna need that satellite map more than ever
but the orange lines dont really help
yea cant color match it, and it would obscure seeing it with eyes
This is a cookie logger. Do not click on it even if you are curious. It will steal info from you even if you just visit the site <@&374193809174822912>
Very cool! Keep going!
reminds me of advance wars.
yes, my artist took inspiration from it
ah ok.
I always thought the unit formations from age of empires was cool.
It was neat to see the units form up in your game.
thanks lol
formations are really important for me
so much that i added formations before adding movement lol
haha.
Map images updated @long raft @pure sierra
Oarbreaker landmass fixed, oarbreaker / fisherman's eastern passage added, weathered expanse fixed as well
nice thanks
Umbral got a bunch of updates, and there's probably other stuff I'm not seeing
Endless shore map is not properly updated
Warmap updated 😄
Individual hex map images from the new devbranch
Do you want the unprocessed ones?
sure
thanks!
somebody will make a foxhole graphics replacer
Also, looks a bit like advance wars
yea, my 2 artists used advance wars as inspiration. as well as metal slug and some other games
Final version?
.... --- .-- / .- .-. . / -.-- --- ..-
what is this gms2?
lol no
what engine
no engine
what
uhhh
the video looks like garbage bc of my OBS config
yea
they do thats for sure
heres something i was working on lol
cool top down
reminds me of endless war (flash game)
i was considering top down for my game too but we settled for this flat style
probs never gonna hear of it again since adobe flash shut down
i took slight inspiration on the art from earlier 2000s "stick games"
it looks very cool
i wanted to do a similar unit command thing but on a small scale
you mean like controlling a small squad
yes
yea that exists in endless war too
i think thatll be too complex for me other than basic orders
like following, cease fire, stay etc
well the way i do my characters complicates things
this engine wasnt made for characters to work like mine do
get unit position. get target position. Pythagoras theorem, move
how so
cant explain without giving you a basic tutorial on how to use the engine lol
looks cool
@zealous sonnet when do you plan the final git update b4 release ?
You can use netlify for free host you project 🙂
Dont forget about new update on Monday and then release on Wednesday, SS going to Medic tab
I heckin love Netlify. They have a generous free tier and really good support for GitHub CI/CD so I make sure to use it for all my projects lol. I'll probably host the API as a subdomain for FoxholeLogi, but I need to implement rate limiting and keys before then for security.
Matt- I’m doing a little mapping project and noticed this heightmap you sent a while ago. Quality doesn’t bug me, it’s actually perfect for my purposes- Is there any chance you could tell me where to/if i can get more of these, or more up-to-date ones? I’ve been poking around using UEviewer and haven’t had any luck, but I’m basically stumbling in the dark haha. Thanks.
Final map images wooo
...okay?
I want the official release to know they wont be changed again hopefully
Thanks for releasing so on time like this 😄 Most tools should be nicely updated by the time the next update rolls out 😄
(I'm not a dev, thank Phil)
https://streamable.com/to8h6y protype of pixel color to tilemap
are you trying to make a heightmap
because if you do it by hand it's gonna take quite some time 😄
No it is not a heightmap
more like a map editor
the color of each pixel is translated into an entity or tile
be it grass, a mountain, a soldier or the starting position of the player. everything is done with a different RGB code
that way anyone with paint installed or any other image editor can make a map for my game without the need for fancy programs or complex documentation
also the image before i start editing it in the video was generated by the game itself with perlin noise
Arf
enraging. but understandable
I can't seem to find how well everything lined up since the last update
Where pixelWorldWidth and leafletUnitsPerPixel ? 😮
warapi must be temporarily off
I think basically all their services are offline for maintenance currently
Pretty sure Icanari is on the money - I'm getting a 504 as well.
It's back up, but I'm not getting any values from WarAPI anymore for map items - both in static and dynamic
nevermind, it's populating now.
im awake
@safe mist $worldSize = ['x'=>5644, 'y'=>6216];
(that is php, but i send it to js too)
var mapWidth = <?php echo $mapSize['x']; ?>;
var mapHeight = <?php echo $mapSize['y']; ?>;
var pixelWorldWidth = <?php echo $worldSize['x']; ?>;
var pixelWorldHeight = <?php echo $worldSize['y']; ?>;
var gridIntervalWidth = <?php echo $gridInterval['x']; ?>;
var gridIntervalHeight = <?php echo $gridInterval['y']; ?>;
//leaflet and warapi top left is 0,0
function getWorldTopLeft(gridX, gridY){
var x = gridIntervalWidth*gridX;
var y = gridIntervalHeight*gridY;
return {'x': x, 'y': y};
}
function getWorldCenter(gridX, gridY){
var topLeft = getWorldTopLeft(gridX, gridY);
var x = topLeft['x'] + (mapWidth/2);
var y = topLeft['y'] + (mapHeight/2);
return {'x': x, 'y': y};
}
function convertApiToPixel(regionName, x, y){//game cords
// """convert x,y coords from Hextiles to Worldmap coords"""
var topLeft = getWorldTopLeft(localIndex[regionName]['grid']['x'], localIndex[regionName]['grid']['y'])
var xcoord = topLeft['x'] + (mapWidth * x);
var ycoord = topLeft['y'] + (mapHeight * y);
return convertPixelToLeaflet(xcoord, ycoord);
}
function convertPixelToLeaflet(xcoord, ycoord){
var leafletUnitsPerPixel = 256 / Math.max(pixelWorldWidth, pixelWorldHeight);
var pixelOffset = Math.abs(pixelWorldWidth-pixelWorldHeight)/2;
//offset to account for non square world tileset
if(pixelWorldWidth > pixelWorldHeight)ycoord += pixelOffset;
else xcoord += pixelOffset;
var xcoord = xcoord * leafletUnitsPerPixel;
var ycoord = ycoord * leafletUnitsPerPixel * -1;
//convert to leaflet coords
return yx(ycoord, xcoord)
}
Where mapSize, worldSize, gridInterval ?
$mapSize = ['x'=>1024, 'y'=>888];
$worldSize = ['x'=>5644, 'y'=>6216];
$gridInterval = ['x'=>770, 'y'=> 444];
$outputImageSize = ['x'=>1200, 'y'=>1322];
now that unprocessed maps are available (for how long?) i wonder if we will see a return of skaj's map mod
Apps string together 
what did you write your map stitcher in?
Php
Leaflet
so hayden stitched the most recent map?
I generated the new map for update my tool on Leaflet
from the region images to the full map all in leaflet?
so it uses tiles of the full map, right?
I still have small problems with the hexagons xD
Yes
and you make that full map in leaflet?
hexagons only ?
yea the ones provided by the devs
@long raft i tile my own world map now via php and the dev git images
<?php
include_once '../_settings.php';
putenv('GDFONTPATH=' . realpath('/home/foxholestats/public_html/fonts/'));
$imagePath = $path.'/tiles/worldmap.png';
$canvas = imagecreatetruecolor($worldSize['x'], $worldSize['y']);
imagealphablending($canvas, true);
$transparent = imagecolorallocatealpha($canvas, 0, 0, 0, 127);
imagefill($canvas, 0, 0, $transparent);
imagesavealpha($canvas, true);
foreach($localIndex as $tileName => $tileData){
if($tileData['id'] < 20)continue;
$mapPath = $path.'/images/Maps/Map'.$tileName.'.png';
$map = imagecreatefrompng($mapPath);
$origin = getWorldTopLeft($tileData["grid"]['x'], $tileData["grid"]['y']);
imagecopy($canvas, $map, $origin["x"], $origin["y"], 0, 0, imagesx($map), imagesy($map));
}
$white = imagecolorallocate($canvas, 0xFF, 0xFF, 0xFF);
$result = imagepng($canvas, $imagePath );
echo "<img style='width:1000px;' src='/tiles/worldmap.png' />";
?>

