• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

Powered Workstations

Deccypher

Refugee
I been away from modding 7d2d for a while and decided to start with what i thought would be a simple mod. powered workstation s ( basically electric versions of all the current workstation player oven, player forge, player workbench player cement mixer ect)

i got the layouts ok, got extra recipes in them so the work more efficiently, adjusted the windows to remove flue req. and increase output size, but even with giving it a power requirement property i cant get it to accept a wire from the genrator. i cant get it to not work without power . ive basically made an op oven that requires no flue.

has anyone got this to work if so what am i mmissing. im aassuming its because the campfire (and workstations in genral) dont have access to the powered class. but not 100% sure.

 
in A16 i could not do it.

I have not investigate A17, but i think it is the same regarding the power of workstations.

(maybe sdx help)

I hope somebody correct me if i'm wrong.

 
Last edited by a moderator:
So yes, this may require more than just XML modification if that's what you're implying.

However, this section is not restricted to Modlet if I'm not mistaken. :)

It looks like he's done some groundwork, which may interest someone else working on the same problem.

Besides, there's a better chance that someone will chime in to help him with the code, if there is something to work with.

 
There is no vanilla class for powered workstations, and no class "close" enough for an easy extension into a new class. Morte wrote a new class for Starvation that added a different type of power that worked, but so far no one has written a new class that reuses the vanilla electric for workstations.

 
I'm a bit confused, but when you say class, you mean XML like

Code:
<property name="Class" value="Campfire"/>
or a C# class in a script like

Code:
public class BlockNeonSign : BlockPowered
Anyway, if it's not possible or easy enough, you could take a different approach.

For instance, include an engine in the recipe of the workstation (or it could be a required tool like the crucible) and make it run on gas?

 
Yes, this about first one (.xml)

Now the workstations operate only with the fire.

there is an <property name="FuelValue" - it is used to calculate time work/burning fuel. Other does not work.

generators run on gas - but they are not workstations.

 
Last edited by a moderator:
I was looking for a reason to start messing with SDX/DMT, so I started working on this topic. :)

Sadly, I couldn't get SDX to work but I had no issue with DMT and could start tinkering.

I'm totally new to this so it's coming very slowly but so far:

- I've created a class BlockPoweredWorkstation that inherits BlockWorkstation

- I've created a block PoweredWorkbench of said class BlockPoweredWorkstation (thanks to SphereII_EntityHook)

- I've successfully overridden the GetActivationText method

I ain't gonna lie, just this felt pretty epic. (Baby steps.)

Is there like an official place to discuss this or is this OK to post code on the forum?

 
Ok, thanks xyth.

I don't know Discord but I'll try to come by at some point. :)

Wouldn't it make more sense to post questions and answers here though? For future reference?

PS: So... I guess people don't use irc anymore?

 
So, I've looked a bit at everything and boy, this will get a tutorial at the end because there are some catches along the way.

I'm logging on my computer the journey step by step.

I don't know if I'll succeed in implementing the powered workstation before A18, but this is so much fun! :)

 
If you share experience on this forum - this will be well for all.

When i have useful information - i'm going to put it here that would be all able to use it.

Coding help is available on Guppy's Discord. Here is an invitation: https://discord.gg/dNgTnE
what secrets are there that it is impossible to do it here on the forum?

 
Last edited by a moderator:
I was looking for a reason to start messing with SDX/DMT, so I started working on this topic. :) Sadly, I couldn't get SDX to work but I had no issue with DMT and could start tinkering.

I'm totally new to this so it's coming very slowly but so far:

- I've created a class BlockPoweredWorkstation that inherits BlockWorkstation

- I've created a block PoweredWorkbench of said class BlockPoweredWorkstation (thanks to SphereII_EntityHook)

- I've successfully overridden the GetActivationText method

I ain't gonna lie, just this felt pretty epic. (Baby steps.)

Is there like an official place to discuss this or is this OK to post code on the forum?
that is epic :) but i only wiork within the bounds of xml im going to try a diffrent aproch tonight so we will see how that turns out.... on a side not i did get my npc worker camps working so was happy with that

 
so im going to be attempting this on stream tonight if anyone wants to stop by and say hi or give suggestions to the mod. nt going to post link here outta respect to the pimps but im easy to fine on twitch and your all more than welcome to come and see me get frustrated with the xmls not behaving how i want :)

 
If you share experience on this forum - this will be well for all.When i have useful information - i'm going to put it here that would be all able to use it.

what secrets are there that it is impossible to do it here on the forum?
Live chats. Quicker information. Shared learning.

...I dare say miracles. :)

And no one on there hoards secret info.

- - - Updated - - -

so im going to be attempting this on stream tonight if anyone wants to stop by and say hi or give suggestions to the mod. nt going to post link here outta respect to the pimps but im easy to fine on twitch and your all more than welcome to come and see me get frustrated with the xmls not behaving how i want :)
Link, fool. :) Pimps don't mind; heck they have a whole forum section for it.

 
I browsed through the stream a bit but the cigarettes were a no-no for me. (20 years of smoking, sorry. :) )

Did you manage to get somewhere without code?

 
Back
Top