Devlog #51 - AssetSystem - chart UI - snapshot build, Asset breakdown display, TruckSystem- introduced 'single order' , Truck crosscity Bugfixes, StoreSystem bugfixes, new mechanic, other UI bugs, - Steam partnership PAID!! GlobalMarket development..
****AssetSystem , introduced chart,same principe as every other, introduction of asset breakdown, TruckSystem, - single order introduced, bug fixed with crosscity and remembering orders. StoreSystem bugfixes with wrong products delivered, UI bug fixes, global market development****
AssetSystem - Last devlog we made the system but now we connected it , same principe if you remember 'snapshots'? Essentially its a list with structs that snapshots each turn with the values, then we can load that list into chart to show per week, month etc..
Now I added the callback for Ui, calls the lastNturns (again same as other), and displays the last many turns that player wants to see. Simple!
Also Ui part is done, did the same principle and callback as we already had in accountingSideTab, which was Expenses Breakdown, now we have assetbreakdown, so , on click on the asset card,the slide panel opens (same as for store industry and everything,trying to ekep everything consistent as possible).
Again, I designed it, and AI wrote the uxml for it to be pretty and beautiful (i gave up trying to make it in ui toolkit...) , and connceted to the callback. Not perfect but it will be better! way better then what i did hahh
_____________________________________________________________________________________
TruckSystem: Single order. So i thought what if a player wants to order once, with a semi or any truck once, import, or from industry ,or to store but then stop it next day, so it wont continue buying more untill the player actually finds the reason why its bleeding money, fills up the inventory of the store, or warehouse , and then gets frustrated with it..so i thought ok, single order.
First idea, simple, you press a button, button changes bool to the truckState which has bool singleOrder , and make a simple check, if(truck.singleOrder) , at the end of the 'handle order' we call method clearTruckRoute and all done.
Then i was thinking ok, what if a player wants to have it again next time, and not loose all routes? Like now its fine with few buildings, but imagine many..so then i thought ok, it shouldn't clear route,it should only pause it..keep everything as it is, but at the end of 'handle order' we just say truck.isPaused = true; this way, if a player wants to use that truck again, just press resume button.
For exmaple:
Simple, we find a truck from Ui, then get the data from the RAM /loaded base not database, change it, writeback to it all, and done. Also, this is a simpel toggle switch, easier then writing 2 different methods..i mean why would anyone do that.....
same way :
see? but you may wonder, wait why the pause is false then? because, the pause is initiated after the order has been made, right at the end. (delivery), so , we say toggleSingleOrder = true, the toggle changes in the truckState, and the truck is paused=false. then it runs the order delivers goods, and changes back to the isPaused; so, the truck now skips days and turns, untill player presses again toggle single order;
First, truck is not paused, runs normally, player presses toggleSingleOrder, the truck now has activebool singleOrder, so now the nxt turn it changes the isPaused =false to true; so now we have still active bool singleOrder, but the truck is paused.. once the palyer wants to resume, toggles single order to off, and automatically the truck is back in business, since we unpause it. Does it makes sense?
Cool ? hahh , so once the play actually want touse truck for something else, just clear route and done.
Truck crosscityBugfix, issue was, major, and hard to actually realize, because it was subtle. The reason was method that calls to clear or orders for trucks in all industries and source buildings. And why? because there could more trucks for the same destionation, and instead of actually calculating that in few places and remembering we just say, at the begining of the turn ,
The problem was that we reset per city, so what happened if the truck has orders cross city? so first city goes, it says ok , industry in the second city has 200 incoming order, then the loop goes through next city, ( if you remember , cityManager goes through all cities one by one), so what happens? first city says, ok awesome this city industry has 200 orders and second city industry has 400 orders. then next turn, the loop calls
Now why is so important? who cares whats the incoming order? well, it matters! I care for starters..kidding, its important because with stateOwned industries , that is what matters in order for industry to grow or expand..if the order is bigger then current capacity, its crucial. otherwise just informatiion wise is very important, becuase player can know exactly why and where and from where the goods are coming..
Solved by simply calling it before all cities...once before the loop that goes through all cities starts..Simple!! But again, it wasnt wether it wasn simple but rather, hard to catch!!
_____________________________________________________________________________
StoreSystem bugfix! So problem - you order goods that are not active in the city that store is in, and the goods dont appear. ok, easy fix, we change it, not it does, but what changes when the goods are stuck inside the store? we can only organize another truck and then send it towarehouse because that city is not buying that product either way.
So i said, ok because of that i have to write more logic,, player has to waste more time trying to send it back elsewhere and then reroute it again, all with using truck and babysiting all that proces.. so i came up with another soltuion, just block the order in the first place if it doesnt exist in the city as the active market. (if you remember, each city has all products but are not shown because , each city only buys certain types of products, but the reason why they have the full list is because of enum consistency for all products across the game) . Anyhow, simple fix! You just cant order the goods to the store, you can select it in the Ui, but you cant save the route.so..same hahah. Solved!!
__________________________________________________________________
BIG ANNOUNCEMENT!!! I APPLIED FOR STEAM PARTNER, SO SOON THIS MVP WILL BE THERE I COMING SOON !! YEAH CONGRATS TO ME FROM ME!
Other bug fixes:
- Finally the DAMN SCROLL BAR is finally not windows 98!! NOw its sleek modern thin pill like.. finally
-SAME FOR NAMING BUILDINGS, it was windows 98 style, couldnt fix it, couldnt figure it out how and why. So then i used ui toolkit debug, and gave it to my ai to fix it and make it beautiful instead.
and many others i just cant remember them all.. small tiny changes, market adjustments, price adjustments, balancing ...
ALSO CHECK THIS CODE REFACTOR! its from future devlog, but still check it out!!
(Spoiler, next devlog is InboxSystem. )
________________________________________________________________________________
GLOBAL MARKET- STILL IN DEVELOPMENT! This is a bigger project, but its related to game mechanic, so i cant say much more about it because it would be a spoiler. BUT, its really interesting how it works, took me 3 days of actually brainstorming untill i had the idea totally clear in my head how to do it, and how to connect it to the existing structure.
Global market will be IMPORT /EXPORT , PRICE EVENT CHANGES, GLOBAL MARKET CRASHES ETC..Fuel costs..So this is a MAJOR MECHANIC , unfortunatelly it would totally spoil the game .... if you wanna know more, il be happy to explain directly!!! very exciting!!!




Comments
Post a Comment