[Mod]: Telescope

A curated forum for compatible and maintained mods. Users are unable to create new topics in this forum but can reply to existing topics. Please message a moderator to have your mod moved into this forum area.
User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: [Mod]: Telescope

Post by King of Worms »

Lovely mod and some great ideas flying around, I agree that some lens distortion would be fantastic, and maybe a lens dirt.

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: [Mod]: Telescope

Post by Hazelnut »

This looks really interesting, do you have a code repo on github?

One of the things on my todo list is to add modding functionality for new items so I am curious about how you added the new item graphic.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

theJF
Posts: 69
Joined: Wed Dec 26, 2018 10:34 am

Re: [Mod]: Telescope

Post by theJF »

When I try to use the telescope nothing happens. I can see the settings correctly in the mods menu at startup. I tried de-activating a few other mods in case of conflict. But nothing happens. I've attached a save in case that helps. Couldn't see anything in the log files. Thanks for any help!
Attachments
SAVE123.zip
(213.53 KiB) Downloaded 132 times

Asesino
Posts: 66
Joined: Fri Aug 16, 2019 3:14 am

Re: [Mod]: Telescope

Post by Asesino »

L57 wrote: Thu Feb 13, 2020 9:01 am Really great idea. Thank you a lot.
Cheers! :)
King of Worms wrote: Thu Feb 13, 2020 11:25 am Lovely mod and some great ideas flying around, I agree that some lens distortion would be fantastic, and maybe a lens dirt.
Thanks KoW! I will look into some ways to distort and dirty up the lens.
Hazelnut wrote: Thu Feb 13, 2020 11:43 am This looks really interesting, do you have a code repo on github?

One of the things on my todo list is to add modding functionality for new items so I am curious about how you added the new item graphic.
I had high hopes to replace the inventory icon. (My original plan was to design binoculars but I couldn't get the icon to appear). the telescope is actually part of the original images. It is 208_0.

I don't have my repo on github, but if you click extract text in the mods section, you can see the code. I don't have any textures or anything, so the code is all that is needed to rebuild the source.
theJF wrote: Thu Feb 13, 2020 8:37 pm When I try to use the telescope nothing happens. I can see the settings correctly in the mods menu at startup. I tried de-activating a few other mods in case of conflict. But nothing happens. I've attached a save in case that helps. Couldn't see anything in the log files. Thanks for any help!
I am sorry theJF, that you are having issues with the mod. Unfortunately, I can't seem to replicate the issue that caused your error. Can you tell me what version of DFU you are using?

In the meantime, you can get this save working with the telescope by editing SaveData.txt. The data for the telescope starts on line 1725. To get the telescope working, please change line 1751 from:

"className": null,
to
"className": "Telescope",

That got it working for me. The issue is that the class wasn't assigned to the telescope; that class contains the logic that runs the telescope.


thanks
a

theJF
Posts: 69
Joined: Wed Dec 26, 2018 10:34 am

Re: [Mod]: Telescope

Post by theJF »

That worked perfectly. Thanks for making this!

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: [Mod]: Telescope

Post by pango »

There's a small issue with mods that use extra cameras, like Distant Terrain or Enhanced Sky: what they display does not get scaled as you zoom in/out.
For Enhanced Sky it's just a bit strange (clouds and stuff not being scaled as you zoom), for Distant Terrain it can reveal cracks where close and far terrains meet:
telescope near.jpg
telescope near.jpg (52.25 KiB) Viewed 2423 times
telescope far.jpg
telescope far.jpg (47.67 KiB) Viewed 2423 times
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Asesino
Posts: 66
Joined: Fri Aug 16, 2019 3:14 am

Re: [Mod]: Telescope

Post by Asesino »

pango wrote: Sun Mar 01, 2020 4:11 pm There's a small issue with mods that use extra cameras, like Distant Terrain or Enhanced Sky: what they display does not get scaled as you zoom in/out.
For Enhanced Sky it's just a bit strange (clouds and stuff not being scaled as you zoom), for Distant Terrain it can reveal cracks where close and far terrains meet:
telescope near.jpg
telescope far.jpg
Thanks Pango. I had assumed that the clouds not scaling was due to fov not affecting skybox. I will have to look at the code for distant terrain and enhanced sky to understand how they are creating the visuals.

Thanks
A

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: [Mod]: Telescope

Post by Hazelnut »

Asesino wrote: Sat Feb 15, 2020 1:58 am I had high hopes to replace the inventory icon. (My original plan was to design binoculars but I couldn't get the icon to appear). the telescope is actually part of the original images. It is 208_0.

I don't have my repo on github, but if you click extract text in the mods section, you can see the code. I don't have any textures or anything, so the code is all that is needed to rebuild the source.
This should be possible very soon, and if you would be willing I'd like to have this mod updated to use a custom graphic, and to stock in shops using the new functionality. I can make the changes or tell you what you need to change, whichever you'd prefer.

Did you draw the icon when developing this before?
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Asesino
Posts: 66
Joined: Fri Aug 16, 2019 3:14 am

Re: [Mod]: Telescope

Post by Asesino »

Hazelnut wrote: Sat Mar 14, 2020 9:01 pm
Asesino wrote: Sat Feb 15, 2020 1:58 am I had high hopes to replace the inventory icon. (My original plan was to design binoculars but I couldn't get the icon to appear). the telescope is actually part of the original images. It is 208_0.

I don't have my repo on github, but if you click extract text in the mods section, you can see the code. I don't have any textures or anything, so the code is all that is needed to rebuild the source.
This should be possible very soon, and if you would be willing I'd like to have this mod updated to use a custom graphic, and to stock in shops using the new functionality. I can make the changes or tell you what you need to change, whichever you'd prefer.

Did you draw the icon when developing this before?
Hi Hazelnut,
I hadn’t gotten to the point of creating my own icon; I wanted to make sure I could do it before devoting time to the graphics (I like the coding part better :D ).

I am excited to hear that there is new functionality for store stocking. I really don’t mind changing the code if you point me to the new methods.

Thanks Hazelnut.
A
Thanks

majkon8
Posts: 1
Joined: Fri Jun 12, 2020 6:50 pm

Re: [Mod]: Telescope

Post by majkon8 »

It’s not working for me, when I try to use telescope in my inventory nothing happens.

Post Reply