Page 1 of 1
Option to define for what type of work-robot a tech applies.
Posted: Sun Oct 01, 2017 2:12 am
by laku
TL;DR
Implement the possibility to define in the effects of a technology for what type/group of (work-)robot the effects applies.
What ?
The implementation could look something like that (highlighted with "=>"):
form technology.lua line2171ff
Code: Select all
type = "technology",
name = "worker-robots-speed-1",
icon = "__base__/graphics/technology/worker-robots-speed.png",
effects = {
{
type = "worker-robot-speed",
modifier = 0.35
=> target =
=> {
=> "construction-robot",
=> "logistic-robot",
=> "other_robot-with-logistic-interface"
=> }
}
},
€: different example
Code: Select all
effects = {
{
type = "worker-robot-speed",
modifier = 0.35
target =
{
"construction-robot-3",
"construction-robot-4",
"logistic-robot-2",
"logistic-robot-3",
"logistic-robot-4",
"whatever-name-you-gave-the-other-robot"
}
}
},
Why ?
It would enhance the possibility to make different robots.
In this very short topic someone has also asked, if this is possible by modding.
viewtopic.php?f=25&t=47876
€ Moreover, nothing like this should be doable with a mod atm.
I hope I didnt keep this request too brief.
Re: Option to define for what type of work-robot a tech applies.
Posted: Sun Oct 01, 2017 3:38 am
by Jap2.0
I'm not sure (I don't mod at the moment), but I think you want the
modding interface requests subforum.
Re: Option to define for what type of work-robot a tech applies.
Posted: Sun Oct 01, 2017 4:53 am
by JohnyDL
Right now the global effects are global and set in the C section of the code AFAIK and so adding effects via mods isn't possible, if you want fast robots you could increase the base speed I suspect. but the effects from technologies et al, they're not modable you can just increase the multipliers via the Lua
Re: Option to define for what type of work-robot a tech applies.
Posted: Sun Oct 01, 2017 5:52 am
by laku
Possible. If that is the case, maybe this can be moved to the right subforum.
JohnyDL wrote:Right now the global effects are global and set in the C section of the code AFAIK and so adding effects via mods isn't possible, if you want fast robots you could increase the base speed I suspect. but the effects from technologies et al, they're not modable you can just increase the multipliers via the Lua
I am not quite sure, if i understand you, but i am asking for a way to select to what robots these effects will apply. As you stated correctly, there is no way to do this with mods, hence i am asking for a way to be implemented to do that.
Re: Option to define for what type of work-robot a tech applies.
Posted: Sun Oct 01, 2017 6:11 am
by JohnyDL
laku wrote:JohnyDL wrote:Right now the global effects are global and set in the C section of the code AFAIK and so adding effects via mods isn't possible, if you want fast robots you could increase the base speed I suspect. but the effects from technologies et al, they're not modable you can just increase the multipliers via the Lua
I am not quite sure, if i understand you, but i am asking for a way to select to what robots these effects will apply. As you stated correctly, there is no way to do this with mods, hence i am asking for a way to be implemented to do that.
I've seen a number of requests for different effect modifiers and different ways for modifiers to effect things from bots on down, and the answers I've seen have usually been along the lines of "it's to do with the prototype in the C part of the program and right now there are no plans to modify this" if you don't want an effect say worker robot speed to work on a robot, I think your only choice is to use a different prototype, but like I say if you want faster bots then you can set the base speed to 2 or 3 and the 2%+ movement speed bonus should stack with that or slower 0.5 or 0.1 movement speed could be used there. but unfortunately it will still get that 2%+ boost
Re: Option to define for what type of work-robot a tech applies.
Posted: Sun Oct 01, 2017 6:27 am
by laku
JohnyDL wrote:laku wrote:JohnyDL wrote:Right now the global effects are global and set in the C section of the code AFAIK and so adding effects via mods isn't possible, if you want fast robots you could increase the base speed I suspect. but the effects from technologies et al, they're not modable you can just increase the multipliers via the Lua
I am not quite sure, if i understand you, but i am asking for a way to select to what robots these effects will apply. As you stated correctly, there is no way to do this with mods, hence i am asking for a way to be implemented to do that.
I've seen a number of requests for different effect modifiers and different ways for modifiers to effect things from bots on down, and the answers I've seen have usually been along the lines of "it's to do with the prototype in the C part of the program and right now there are no plans to modify this" if you don't want an effect say worker robot speed to work on a robot, I think your only choice is to use a different prototype, but like I say if you want faster bots then you can set the base speed to 2 or 3 and the 2%+ movement speed bonus should stack with that or slower 0.5 or 0.1 movement speed could be used there. but unfortunately it will still get that 2%+ boost
i am familiar with the changes you can make to bots
. some dev (sry forgot who it was) also posted the part of the c code in discord showing how robot speed is calculated.furthermore, please dont forget, in my original idea i am not only talking about speed but also about cargo size ect.
but lets try to explain it a bit further.
lets say you play with full bobs and angels then you end up with 5 tiers of construction robots. while the all have different base speeds, the multipliers from technologies an for forces affect them in the same way. just like construction robots and logistic robots from vanilla are affected the same from these multipliers.
generaly speaking it limits the diversity of what can be done with robots. so my suggestion would incurage the creation of new "robot-with-logistic-interface"s.
Re: Option to define for what type of work-robot a tech applies.
Posted: Sun Oct 01, 2017 10:26 am
by JohnyDL
I see, I do kind of focus on speed cause it's the most visual and maybe just a tweak to capacity bonus (rather than a +1 being a *1.xyz) that gives the same change to vanilla but would have knock on effects comparable to the size of the initial inventory would do that, I know what you're kind of asking for is maybe an extra way to tweak the bots based on the levels of things maybe clicking on a bot with a speed module gives it an extra speed boost compared to any other until it lands which would be cool or an efficiency module (or a few stacks of them) could make a sigle robot capable of picking up an entire inventory of items, but I don't think the Devs would go for such a change as it means you can't do a matrix calculation to apply to all bots each one has to be processed individually adding to overhead and reducing UPS
Re: Option to define for what type of work-robot a tech applies.
Posted: Sun Oct 01, 2017 11:59 am
by laku
JohnyDL wrote:I see, I do kind of focus on speed cause it's the most visual and maybe just a tweak to capacity bonus (rather than a +1 being a *1.xyz) that gives the same change to vanilla but would have knock on effects comparable to the size of the initial inventory would do that, I know what you're kind of asking for is maybe an extra way to tweak the bots based on the levels of things maybe clicking on a bot with a speed module gives it an extra speed boost compared to any other until it lands which would be cool or an efficiency module (or a few stacks of them) could make a sigle robot capable of picking up an entire inventory of items, but I don't think the Devs would go for such a change as it means you can't do a matrix calculation to apply to all bots each one has to be processed individually adding to overhead and reducing UPS
Nope, still not what i am asking for
So you see, at the moment speed is calculated like this:
speed_of_the_robot = base_speed * (1 + worker-robot-speed) * (1 + worker_robot_speed_modifier) * (SpeedMultiplierWhenOutOfEnergy / 1)
(once i am on my computer i will give all parameters the correct name)
-
base_speed speed is the value you can set for each type of robot. in vanilla construction-robot and logistic-robot have different values or with bobs mods all different tiers of the construction-robot have a different value here.
- worker-robot-speed is the sum of all modifiers you get from researching the speed upgrade. this is the same value for all robot-with-logistic-interface.
- worker_robot_speed_modifier is a modifier for different forces in the game. again shared across all robot-with-logistic-interface.
-
no_energy_penalty SpeedMultiplierWhenOutOfEnergy is again specified for each entity separatly afaik just like base_speed.
now i would like to see work-robot-speed to be replaced with a modifier based on the name of the robot. lets say you have bobs mods and some costum robot-with-with-logistic-interface that neither fits in the 2 groups of construction-robot nor logistic-robot an you want a research to affect logistic robots 3&4, construction robots 2-4 and your costum robot, then my code example from my first code woul look something like this:
Code: Select all
effects = {
{
type = "worker-robot-speed",
modifier = 0.35
target =
{
"construction-robot-3",
"construction-robot-4",
"logistic-robot-2",
"logistic-robot-3",
"logistic-robot-4",
"whatever-name-you-gave-the-other-robot"
}
}
},
€ adjusted the names of the variables
Re: Option to define for what type of work-robot a tech applies.
Posted: Sun Oct 01, 2017 12:35 pm
by laku
i am not sure if rseding stated here, that the idea is not possible
viewtopic.php?p=310038#p310038
Re: Option to define for what type of work-robot a tech applies.
Posted: Sun Oct 01, 2017 4:39 pm
by JohnyDL
Laku that thread is exactly the one I was remembering while discussing this.
For multiple effects couldn't you instantiate the robot as both types have the calculations worked out for each type and then return a Min or Max of the different values?
Re: Option to define for what type of work-robot a tech applies.
Posted: Sun Oct 01, 2017 7:15 pm
by laku
JohnyDL wrote:For multiple effects couldn't you instantiate the robot as both types have the calculations worked out for each type and then return a Min or Max of the different values?
Are you suggesting this to me or to the devs? If you are suggesting this to me, this is either not possible or I simply don't understand you. If this is a solution to the devs to implement my suggestion, then I think we can agree on your idea.
Re: Option to define for what type of work-robot a tech applies.
Posted: Sun Oct 01, 2017 7:25 pm
by JohnyDL
laku wrote:JohnyDL wrote:For multiple effects couldn't you instantiate the robot as both types have the calculations worked out for each type and then return a Min or Max of the different values?
Are you suggesting this to me or to the devs? If you are suggesting this to me, this is either not possible or I simply don't understand you. If this is a solution to the devs to implement my suggestion, then I think we can agree on your idea.
More for you, when you make a bot actually code it as 2 bots and make it so when one of them gets picked for a job it automatically makes the other one busy
Re: Option to define for what type of work-robot a tech applies.
Posted: Sun Oct 01, 2017 7:40 pm
by laku
JohnyDL wrote:More for you, when you make a bot actually code it as 2 bots and make it so when one of them gets picked for a job it automatically makes the other one busy
This is no possible. Because the worker-robot-speed technology is infinit you end up with infinit versions for a robot with different speeds. It gets worse the more robots you have. Furthermore, you would need to keep track of every robot. Because you quickly get tens of thousands of robots, you quickly end up with a perfomance problem.
Re: Option to define for what type of work-robot a tech applies.
Posted: Sun Oct 01, 2017 8:31 pm
by Kayanor
Moved from Ideas and Suggestions on OP request.