Devlog - #24-28 , OfficeSystem Update (added negative modifier for the office ), TruckSystem update (how does truck knows whether it is an industry -> store, or industry ->warehouse), Truck Ui update,
******Updated office system, TruckSystem , truckUI as well as introduction to warehouse, in the future devlogs.
________________________________________________________________
OfficeSystem : Added negative modifier, as we discussed in the previous devlog, now we actualyl implemented the negative modifier. Without revealing too much, the percentage of the negativeEfficiencyModifier is now proportional of the amount of 'overdraft' (excuse my english) , over the maxWorkload available vs workload. For example:
maxWorkload =100 , workload is 120 , so overdraft is 20, the negative modifier is proportioanl, and equal on all subdivisions and buildings. Because if the overdraft is split by the amount of the buildings, it would be insignificant, and player wouldn't care whatsoever about small penalty', thats why it is universal . So if the workload is 150, and maxWorkload is 100, its 50 overdraft. Then it applies directly in the each system, as storeSystem , or industry, and affects the max output , sale etc..
TruckSystem update : Becuase I added more features , the problem arrised, which was, what if a player wants to deliver from industry to warehouse, or , from store back to warehouse, or from warehouse to industry? (that will be later implemented as player owned) , so the issue was how does it know? Because in order to know where it should deliver it should go through ( data driver remebmer), it should find a specific list, and then use the 'sourcelocationID', becuase, source location can be either on the list of industries , lets say for example ID =1 , but then also it can be a warehouse or a store at the same ID, only different list. So that is why I added the switch case, in which case, it would basically if industry is selected, it woudl go through the list of city.allindustries, instead of city.allstores.
Same goes for destination, it takes the type first, then it goes through the list, and finds the id necessary tro deliever the product.
So i used another Enum, to split the cases
it will have much more,, but trying not to give up with feature creep. mvp is the goal here hah
thank you!
oh yes and UI:
as already shown previously as an example, the UI now had changes with the visuals, so now it is more clear to know what is going on and how it is calculated, also the expenses and calculations are done while moving the slider. for example
So, how I solved this is that using the public static float, which calculates all in real time , and then upon the button save, it saves the data. it basically takes the source ID, destination ID, calculates the distance and multiplies by the TruckType, ( which will have 3 types for now) , and that depends on weight of how much the truck can carry. so that is determined by the product data, which contains weight, then the max weight of the truck (that can carry , selected type of the truck) is divided by the 'weight ' of the product, and that is how we got 500, second, is the cost which is basically multiplied value of slider times the price per unit of the industry that is buying it from, and then combined with the transport cost.( yeah its too little, that is the balancing phase later)
Thank you!


Comments
Post a Comment