XiozZe / XioScript

XioScript
11 stars 16 forks source link

XS 12 development thread #26

Closed TeaMike closed 8 years ago

TeaMike commented 8 years ago

combining input here for further discussion, in response to comments across other "issue" threads.

MICO currently has 7525 subdivisions .. not that i am not used to do something else when XS is running. If you say server load isn’t an issue, i shall say CPU doesn’t matter. Clicking one button and walk away for hours would be .. of course, wonderful. It won’t work for me hough because of the amount of subdivisions can’t even be displayed on one page.

My main worry with the one button for all would be about losing fine-tuning options, and making costly settings which i wouldn’t do manually. Visiting of 2 or 3 screens in each of 7525 subdivision will take a tremendous amount of time. Devil lays in the details: bulk functions in XS 10.5 can be executed or not, it leaves room for individual measures and fail saves.

A über-function on the subdivision list: apply this subdivisions XS settings to all selected subdivisions would be saving a massive amount of time.

My setup: Overstocks rarely occur in producing subdivisions but in warehouses. Like yesterday i put 40 of 70 sheep farms on holiday and re-enablled them today with just a few clicks .. overstock is gone. Would XS12 require two visits at 40 subdivisions to achieve the same?

95% of production is localised (mostly by department , sometimes per products with flow of goods through local warehouses, input and output in the same city. Overstock at factories are accidental, mostly happen in warehouses where I’ll eventually find that input exceeds output by a multiple volume from those selected but there might be products in the same warehouse which buy a partial quantity only from a warehouse in another region, even there’s more quantity available to buy it is not wanted. Few products also have worldwide, centralised production and thus supply from a regional warehjouse to several other warehouses in other regions.

I use two methods to deal with stock exceeding a 2-3 daily supply a) send it a worldwide collection point for temporary supplies or whole sale b) stopping the supplying factory for the amount of days required to deplete the overstock. This can apply to single factories (which i fix on their individual supply screen) but also a bulk of the same subdivision type at once - say 150 flour mills - which i fix with XS.

some remarks/issues re subdivision level script control

general remarks:

XiozZe commented 8 years ago

I wouldn't say server load isn't an issue, as I have no way to actually know, but XS12 never loads the same page twice in one run. Although, with a lot of pages for each subdivision and taking in account that you need to return data as well, I would say that there are a maximum of 10 calls needed for one subdivision. (The average is much lower though.) For some reason, the server is freaking fast compared to a year ago, so my 42 calls to the server take only 1.8 seconds, including CPU time here. In total, that would mean that the maintenance button would take 7525 * 10 / 42 * 1.8 / 60 = 54 minutes max.

I might doing some macro functions for sake of clarity, manageability and usability, although I haven't thought those through yet.

For the warehouses: I have some ideas for functions, so you might want to see these first before drawing any conclusions about how XS10.5 is superior to XS12. You might as well wait for the advertisement functions.

I have changed the 0.001 addition for the prime cost to 0.01, and the price is kept if the prime cost is zero. You can repost the TM bug as a standalone thread, because I will look at it later.

At the moment I do not see functional value in the scripting of the HR department. XS12 should be able to fully take over the HR department so I don't expect to see the users actually using it.

TeaMike commented 8 years ago

thanks for your feedback. I'll be looking forward to see more of XS 12.
As for the HR department, advantage is that you don't even have to log in and it still works. Doesn't seem nice for a script to make a paid service obsolete and didn't think of it as a big deal to post the number into an additional field but of course its up to you. Just so i asked, is fixing the TM display in XS 10.5 really a big deal, script-wise? I wonder if i should try finding someone able to fix it. There's other scripts for that but the difference is that yours has shown numbers based on actual qualification without bonuses, that was the big advantage.

XiozZe commented 8 years ago

It should not be a big deal, but isn't the interface going to change soon anyways? I can make the Top Manager Stats as a standalone extension though.

TeaMike commented 8 years ago

it seems possible that the TM only doesn't work because it draws the TM data from the TM page which has changed since display of the TM infos with 7.3 still works well. You suggested players keep 10.5 around for some function (rename, delete subdivisions etc) so i think a fix of the TM would be the easiest there.

XiozZe commented 8 years ago

Soon the TM function of 7.3 will not be working as well. I have scripted the TM function for XS12, for the new interface, as it seems that you cannot rule your company without the maximum amount of employees on profile which seems to be missing in the new interface.

XiozZe commented 8 years ago

In the new version 12.0.5, Warehouse functions are added, as well as other small stuff. Be sure to check the wiki!

TeaMike commented 8 years ago

Please can we have xiomaintenance add missing links with the default setting to the local storage automatically when it runs for the first time on a subdivision. It will spare each user the opening of thousands of pages to achieve the same result: having the functions listed on the overview page.

XiozZe commented 8 years ago

Although it the process of visiting 7525 times ... three maybe? does seem tedious, it is (or should be) a once in a lifetime task. Until you switch browsers, clear your local storage or well maybe I should make it slightly easier though. I do not see the perfect solution for it yet, as hardcore checking all the pages of all the subdivisions (7525 times ... ten?) seems a bit overpowered if you only need to add the options for three new built subdivisions.

TeaMike commented 8 years ago

Doesn't the script cross-reference the entries for each subdivision anyway, e.g. get the ID and see if there's any setting other than "don't do anything" ? E.g. if there's is no entry, do nothing, if there is one, execute it? My suggestion comes from there: if there is no entry, set it to "don't do anything"; it doesn't seem to add a lot of overhead.

FYI just 2 weeks ago my browser wiped out all scripts and emptied chrome's local storages; i've spent hours trying to recover it (from backup) without luck.

I have to admit that i am still not convinced about the time savings with this new style of management, switching on and off settings regularly instead of just executing the function once its needed.

I look forward to the completion of the script's functions to get a grip on it (no point in visiting all those pages now and then again each time whenever a new function is added).

Finally, i hope other users would provide their comments to give a broader input for your consideration.

XiozZe commented 8 years ago

XS 12 saves all the options by subdivision id in the local storage, for example my mill:

x3498784 = "es1;et2;pc5;pl2;sp3;qp1;tc1"

The 3498784 is the subdivision id, and I place an x in front of it so I can see that I'm the one that placed it there in the local storage. The string can be cut in 7 pieces, by taking out the ;-signs. Every piece has two letters and one or more numbers. The letters are referring to a function: es = employee salary, et = employee training, pc = production price, pl = production policy, sp = production supply, qp = equipment, tc = technology. The number represents the choice: 0 means "dont change" in all cases, and every other number corresponds with an option.

When the script executes the XioMaintenance-function on the unit list page, it gathers all these string s from the local storage, then it checks whether the choice is zero: do nothing. For every other choice there is a set of server calls for page loads. Every choice has it's on list of pages it has to load, so different options can lead to different amounts of page loads. For example the primecost function only loads the sale page, while CTIE function has to load the sale page, the CTIE page, and the TM pages (to check which TM is which product so it can find the product on the CTIE page).

What this means is that if the choice of the production price of a factory is not set (you haven't visited it once) XS12 does not come to "see" that page, so it will never be able to set the choice to "don't change".

Also, to reduce server load, if two different functions require the same page, a XS12-function in the script will automatically supply the second function with the data retrieved in the first, so it does not retrieve the exact same page twice.

On the time issue: it is true that especially with your approach, where you only run the restaurant and store price function daily and equipment and other function weekly, it does not seem a large burden to just continue that behavior every day. But what I want to run daily is a lot more: I want to run the equipment function (for those small repairs that actually would go weekly as well), and the production price function (for the small fluctuations) and the salary function (for training increase) and the warehouse supply -world market- function (you rely on your own goods so that would be unnecessary) and the laboratory functions (because I'm to lazy to add a factory to the lab myself) and the ... well basically everything. So I have select a couple of subdivisions, press that button again, wait for a bit, then again select a couple of subdivisions, press that button again, wait for a bit, ... Boring! So for me it is a, 10 to 15 minutes save each day? With the current amount of functions that is.

At the moment you only have nine different categories of functions, with maybe three options average for every function. I plan many more. It's just that it takes a considerable amount of time and research to successfully think one through and then create one.

I'll give a high priority to the XioGenerator (#37) and a fairly high priority to the Import and Export functions (#36) so that I can slowly convince you to switch.

TeaMike commented 8 years ago

thanks for taking time to consider my concerns and provide this detailed explanation.

I totally agree that doing things daily is a great thing, its just about those exceptions which make things look a bit tricky but i there will be solutions, eventually, as always ;)

TeaMike commented 8 years ago

Top stats for Sawmills are missing

XiozZe commented 8 years ago

The sawmills should have top manager stats now, although I have no way to know because I don't own a sawmill.

By the way, could you open new issues for every problem, no matter how small? I'd like to close issues I have finished, and not have to read through the whole thread again to check if there is an idea I have missed.