Jump to content

A15 - Working Electric Lights


Valmar

Recommended Posts

This mod lets you craft and place working electric lights.

 

workinglights_zps4ptpyon7.png

 

 

Blocks.xml:

http://pastebin.com/RfYXbBSB

 

Recipes.xml:

http://pastebin.com/8SWBvzJA

 

 

Optional -

Localization:

http://pastebin.com/MBwdT4XK

 

Add this to the localization text file in your config folder if you want the in-game names to look more natural.

 

Let me know if you have any problems or questions.

Link to comment
Share on other sites

Hi,

 

I installed without custom icons.

 

The crafting part is working fine and the lights work too (have to be placed sometimes several times as described).

 

Unfortunately I cannot get lightbulbs by hitting existing lights with bare hands (or I was very unfortunate).

So in loot.xml under <lootgroup name="junk"> I added <item name="Lightbulb" count="1,2"/>.

 

Great mod! Thank you very much! :)

Link to comment
Share on other sites

Hey Bfc. That's because I'm an idiot. Dont worry about it. I dont know what I was thinking. For some reason I forgot I had to mod the vanilla lights too get that to work. I'll adjust the description. Thanks for pointing that out.

 

Also two things to note:

 

1. If you use ANY of my mods you only need to use the one included custom icons folder. It has ALL my modded icons (I dont touch vanilla icons though) so if you use more than one of my mods you can just download it once and forget it.

 

2. You dont NEED the icons. The game functions fine without them. Though the items and blocks I add will be blank in your inventory without them.

Link to comment
Share on other sites

I'm just about ready to stop doing my own mods and start waiting for you to post yours Valmar. You're usually just a step ahead of me. LOL

 

Question though, is it possible to "push" the icons from the server? I'm trying to avoid any mods where everyone has to download files to play on my servers. Mostly I just do xml hacks, but lighting is a big concern.

Link to comment
Share on other sites

@Razz

 

Because you cannot update the title of a mod that already exists. Well, you can, but the title in the topic listing doesn't change to reflect it. Unless that has changed since my early days here.

 

Instead of Expanded Working Lights I wanted to name it Working Electric Lights to better reflect what it is.

 

I apologize if my individual mods have upset you. If it makes you feel any better Im sure in a day or so they will all be buried and forgotten anyway. I don't typically "bump" topics - though announcing that they are updated to work with the new alpha version of the game (which is a significant change) I believe is "fair game" and reasonable considering with A13 there will likely be new players and old players alike returning who may otherwise never know about the mod existing. There aren't a ton of mods, atm, that are compatible with A13 either. So I see it as a "win win" - I get a small, rarely used bump and new interested players get to see what mods are currently compatible with the recent build.

 

I'm not sure why it bothers you how I choose to share my mods, though. I like individual mods because not everyone will want to get the "full package". It's how I started modding, one small mod at a time, so I dont want to "turn my back" on it. Trust me it would be much easier for me to ignore all these individual mods and focus only on my mod pack. Tempting aswell. But I appreciate mods that let you pick and choose and I do this out of the spirit of that, under the assumption that there will be at least one person out there like me who would appreciate having the choice.

 

I feel it fit to warn you aswell that there will be a few more mods of mine updated for A13 in the coming days as I go through the list. One will be another "new topic for old mod" since there is new content added to it and I want the title to reflect it.

 

I'm not sure what I've ever done to offend you, Razzoriel (is it because I never understood the problem you were having with ammo?) but I hope we can overcome it. I do not know you so I may very well be reading too much into it but this along with previous posts you've made directed at me gives me the impression that I've soured you at some point - though when or why I do not know. I apologize for any unintended offense I may have caused both now and in the past and hope you believe me when I say I genuinely "meant well" with everything I've done - I've never intentionally meant to cause you any offense.

 

 

@Sylen

 

I hope thats a good thing, lol. I also hope the working oven mod I shared recently will be of help to you - I know you know how to do it already but if you hadn't gotten around to it my recipes should save you some time thanks to how the new workstation works (cant piggyback recipes). :)

 

As far as I know there is, currently, no way to push icons from servers.

 

Though the only icon that this specific mod requires is the "Lightbulb". You could give it a customicon property to overcome this however.

 

I understand the reluctance on using custom icons. To make it easier, should you ever decide to go that route for your server, may I make a recommendation?

 

Make a folder in your favorite upload hosting service. I use mediafire. This folder is where you will place the icons zip. Link the folder to people, that way you never have to worry about the link changing or being outdated - since the folder will stay the same and you're free to change the contents of that folder at any point. Also consider setting up a url redirect. I personally prefer using http://www.tiny.cc because they are free and let you set up an account where you can keep track of all your redirects.

 

Here is what my server uses as an example:

http://www.tiny.cc/valmodicons

 

This link should never change and I can keep the contents of it updated. The tiny url makes it easier for people to visit from a server description and the nature of how the redirect and folder works means I dont have to manage keeping the link updated everytime I change something.

Link to comment
Share on other sites

What? I have no underlying issue with your mods, they serve a purpose for the community and people like it, kudos to you. What I don't see as productive is that the entire Modding forum has the front page with 6 threads with different mods from you. Which is why I asked you to make one compilated mod thread with all of your mods, so people can go and pick whichever they want and like without you cluttering the entire forum with itsy bitsy mods.

 

You have caused no offense whatsoever to me. What I've asked for is cleaniness in your work, because it has excellent quality, but is bringing a drawback in which other modders have less time to showcase their work. This is not a complaint solely drawn by me; other modders expressed their discontent towards your method of showing your mods. Again, to be clear, this is not a critic towards your work, and I do not have any complaints whatsoever towards it. I'm just giving you, once again, a feedback on the way you organize it and show to people.

 

This being said, good job on your timing, and with the mods you posted so far. Keep it up.

Link to comment
Share on other sites

@Valmar Yes, that's a good thing. =P I spend more time playing than modding.

 

The recipes change was pretty easy. I just copied all the campfire recipes down to the bottom and used a script to change campfire into wallOven. Initially I had an issue where I could start the fire, but not actually cook anything. (Cook button was not functioning.) I think I found the error in that a minute ago though and will be testing it shortly.

 

For the icons, it's not a huge deal, I usually just use an existing one and change the hue for ease. It would be really cool to get them pushed from the server though.

 

On the files, I host my own hardware, so I'll just set up a webpage on it with the download if I ever go that route. Or embed the link into my web map page. I was a bit surprised that xui.xml was not pushed from the server though. Might just have been an oversight in pushing a13 out though.

Link to comment
Share on other sites

@Razz

 

I did make a topic for that. I will try a different approach then. As for the other modders, it would had helped if any of them actually bothered to tell me about their complaints. :p

 

Granted, YOU did, yes, but this is the first I'm hearing of it. If they had a problem with what I was doing (or rather, how I was doing it) I would had appreciated them tell me directly rather than having you be the voice of the people. I'm not dismissing their concern, or yours, I'm merely expressing that for future reference it would be nice if I was made privy to all the background discussion apparently going on that relates to me.

 

You'll have to forgive me if I got the wrong impression, initially, from your criticism. It came across as a bit... well nevermind that doesn't matter, all that matters is that I have heard your concerns and will try another approach. I'm sorry to you and all the others, apparently, who I have... not offended but troubled or whatever the word. I understand where you're come from now and I will adapt. It wasn't my intention to draw away from anyone elses work - we're all in this together afterall. Sparkle sparkle.

 

 

As for my "quickness" in all this, well, I had an unfair advantage. I've had the A13 files for some time before it was officially out thanks to moderator privileges. I had hoped to share info with you all here (I even approached the devs about it) but sadly that was not to be.

 

At anyrate I hope my new "method" will be more satisfactory. Sorry again for any unintended consequences. Though there is at least one of them I will be making a new topic for so I can change the title, as I mentioned earlier.

 

 

 

 

@Sylen

 

Meanwhile I spend more time modding than playing. :)

 

The devs are aware of the XUI files not pushing. Thats probably all Im allowed to say on the subject though. Not sure.

 

I will say this though: I do think there is a benefit to not having the XUI files push. Custom UIs are very, well, personal. Its all very subjective. Being able to use your own UI on a server is nice. There are drawbacks, naturally, but I do see the benefits.

Link to comment
Share on other sites

They "work" in the sense that they don't break EAC to use or anything - and people can still join. But anyone who joins who doesn't have them will just see a blank icon. So in the case of this mod they won't see an icon for the lightbulb.

 

You could "fix" this by giving the lightbulb a customicon property.

 

 

<property name="CustomIcon" value="ceilingLight01" />

Link to comment
Share on other sites

Yeh i dont see any issue with the way it has been done Valmar honestly. Like me others will search a few pages for mods. I have a few modders i always look for and always use their mods. As more mods come out more stuff will be seen as well.

 

Like i do understand what Razz was saying and wasnt trying to attack or anything but yeh no issues here with how your doing it.

Link to comment
Share on other sites

Yeh i dont see any issue with the way it has been done Valmar honestly. Like me others will search a few pages for mods. I have a few modders i always look for and always use their mods. As more mods come out more stuff will be seen as well.

 

Like i do understand what Razz was saying and wasnt trying to attack or anything but yeh no issues here with how your doing it.

^^ I agree completely. And I absolutely love the way it's done in separate little snippets.

 

I really don't like the full-on change everything mods. I like to make little tweaks. (Which probably makes it more of a PITA every mini update, but meh) The last time I used a full mod was a10, but I was new to modding then. It was a real headache, and fixing it is what really got me into modding.

 

Lately I'd post mine, but half the time Valmar's already done it. :triumphant: We think very alike in what we want from our mods I think. Reminds me, I need to update my light blocks for a13. Might remember to do that after I finish these prefabs I'm doing atm.

 

Keep up the good work Valmar.

Link to comment
Share on other sites

Valmar,

 

Will/Did this work in 12.5? I think I'm reaching a point with 13.x where I am spending more time modding functionality (BACK) into 13 to make it play/look more like 12.5, so I think I may just go back to a 12.5 build and give this 13.x thing a few weeks/months/years to work itself out.

 

If this mod/change existed for 12.5, I hadn't found it yet, and although I could checkout all the code and see if it appears compatible, (and test it), I just thought I would do something really stupid and just ask. :)

 

If it did exist for 12.5, can I get a copy of those XML changes? Please? Thanks.

 

 

 

 

Fred_Z_Killer

Link to comment
Share on other sites

@Fred

 

The code, as-is, could be made compatible easily enough I believe. You'd have to remove the harvest code from the blocks and and item (hand) and adjust the recipes, but it can be done.

 

 

 

HOWEVER! It just so happens that, because I made a new topic for this mod (ported from A12.5) to change the title that means I still have the old A12.5 topic. So lucky break for you!

 

 

Here is the old A12 topic:

 

https://7daystodie.com/forums/showthread.php?32203-Expanded-Working-Lights&p=308408&viewfull=1#post308408

Link to comment
Share on other sites

Thanks a bunch Valmar. I got courageous this morning and added the lights to my 12.5 config and got it all working. Didn't worry about salvaging the existing lights either. Mostly had to add the grid setting back into the recipes.

 

As I (appear) to becoming more a (12.5) mod'er, I am curious about something. Do you and the other heavy-duty mod'er(s) have a dev source for some of your mods, or are you just reverse-engineering what's in the XML files? I have been able to do a bit of work with some aspects, but I had to steal your icon-image part to add my own graphics onto objects I defined. Also, in 13, I see XML which is obviously pulling values from the program/engine (Xui for example) and I'm curious where those values are coming from. Anyway, just curious...

 

Again, thanks for the link. :)

 

 

Fred_Z_Killer

Link to comment
Share on other sites

@Fred

I can't speak for the others, obviously, but 90% of all my mod work was reverse-engineering existing xml code in the files. I've gotten inspiration from a few other mods now and then, of course, little "oh, thats possible?" moments - like the multidimblock or particle classes. That isn't to say I haven't brainstormed things with other modders to come up with cool things (like AutoWall for example) but its all been without any official guideline or wiki, beyond what is already in the xml files. Though Kinyajuu, a dev, has been a great help giving notice of things that can be modded in and whatnot. Sometimes just knowing something IS possible is all the push you need. Plus a lot of the XMLs do have small "guides" written in them that give you at least some basic groundwork knowledge that can help pave the way for you.

 

I do know when I started out I had issues finding help or information on modding in general. Felt more like "unexplored territory" to me. Now though there are more active modders on the forums helping out and sharing information so its a great time to get into modding, imo.

 

@Jerseyetr

 

Are you using the optional recipe book? Start the game and immediately open the console with ~ then scroll up. You will/should see a red message telling you what the problem was/is.

Link to comment
Share on other sites

Wow! This looks incredible :)

I'm so installing this mod before the week end. Thank you very much

I assume you are quite a perfectionnist, so I have to say, I found this in the recipes :

 

<recipe name="Street_Light" count="1" scrapable="False" >

<ingredient name="forgedIron" count="5" />

<ingredient name="forgedIron" count="1" />

<ingredient name="headlight" count="1" />

</recipe>

 

I suppose you meant "scrapiron" :)

Link to comment
Share on other sites

Well, the real problem is that I have forgedIron in the ingredient twice when I could just combine them.

 

Other than that, Im not sure if I want to make it scrapiron. Might make it too cheap to craft them. Though maybe I should. I'll consider changing it in my mod pack since it has a class system that makes forgediron a bit harder to come by already.

 

Thanks for your input, its appreciated.

Link to comment
Share on other sites

Yes, I was also talking about the fact that it occurs twice, actually!

 

I thought maybe you meant "5 scrap iron and 1 forged iron" or "5 forged iron and 1 scrap iron" and thought I should point out :)

 

 

Well.. Couldn't wait haha. Already installed, tested, and everything is good to go (screwing version, without loot containers). Thank you very much, it works like a charm ! I will check out your other mods too

Link to comment
Share on other sites

  • 4 weeks later...

A few times I was contemplating using this mod but... naaah.

Lights that can be picked up anytime are a horrible idea. I can't handle that. (Not your fault but that's the way it is!)

My candles and torches haven't been "pick up" in like forever because I acidentally picked them up too often.

 

 

However, this is merely a technical issue.

 

  • Place, pickup, place, pickup, place... until the light well, lights.
  • Upgrade to the permanent version.
  • Enjoy working light that stays where it belongs.

 

 

 <block id="1909" name="Industrial�Light">
   <property name="Extends" value="industrialLight01" />
   <property name="CustomIcon" value="industrialLight01" />
   <property name="Class" value="Deadgrass" />
   <property name="CanPickup" value="true" />
   <property class="UpgradeBlock">
     <property name="ToBlock" value="Industrial_Light_Solid" />
     <property name="Item" value="scrapIron" />
     <property name="ItemCount" value="2" />
     <property name="UpgradeHitCount" value="4" />
   </property>
 </block>
   <block id="1910" name="Industrial_Light_Solid">
   <property name="Extends" value="industrialLight01" />
   <property name="CustomIcon" value="industrialLight01" />
   <property name="Class" value="Deadgrass" />
 </block>

 

Link to comment
Share on other sites

Well you could remove the pickup property but then they'd have to break it.

 

Another possible solution would be to make them upgrade rated. If you dont pick it up after a minute it will upgrade into a version that cant be picked up. Not sure if it will mess with the rotation or not though.

Link to comment
Share on other sites

You can't use upgrade rated because you need to assign the grass class.

 

And breaking them over and over is too crude.

 

 

I know that your way works but I can't deal with furniture that picks up on pressing E.

Just saying that there is a neat way to have both.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...