Creating an NRaas project MC Additions

Talk nerdy to us here.
icarus_allsorts
Reactions:
Posts: 213
Joined: March 8th, 2012, 6:00 pm

Post by icarus_allsorts » May 13th, 2014, 6:51 am

*phew* I did peek into Retuner a while back but came out absolutely lost :S

Function-wise, changing lot addresses makes the most sense in MC, assuming it's ok to have the mod store a dictionary just for the one feature. I've yet to try it actually, but in my head at least the idea (reapplying the stored addresses to lots at loadup) seems sound.

icarus_allsorts
Reactions:
Posts: 213
Joined: March 8th, 2012, 6:00 pm

Post by icarus_allsorts » May 13th, 2014, 11:04 am

Good point about MC being a one-shot-function mod. Somehow Retuner doesn't seem like the mod you'd expect such a feature from though. Whichever mod it goes into, I didn't even consider the edited addresses exported and imported by Retuner as part of the mod's settings. It would be useful when starting a new game in the same world, not so much if not (in which case it may actually be a problem). Hm indeed.

User avatar
Chain_Reaction
Site Admin
Reactions:
Posts: 7609
Joined: December 30th, 2011, 6:00 pm
Answers: 81
Contact:

Post by Chain_Reaction » May 13th, 2014, 5:33 pm

Well retuner's purview is editing existing values to your liking. While so far such values have been XML based, I don't think we're too off base throwing it there.

As SimAd said adding it to MC changes the dynamic of the mod. That wouldn't be criminal though.

As for exporting: I wouldn't support it. As has been noted the lots are world specific and even then the user can add lots that wouldn't be in the new world. Plus I'm pretty sure each lot is given a different lotid per world instance so you'd have to save the old address to match it with the changed one. Basically too many variables.

icarus_allsorts
Reactions:
Posts: 213
Joined: March 8th, 2012, 6:00 pm

Post by icarus_allsorts » May 21st, 2014, 5:28 am

Would it be ok to release it as an MC module?

I know it doesn't change the fact that the user will lose the addresses if they took out the module and/or MC for any reason, but the MC framework just made everything easier. I did try using the base NRaas framework to set up a completely new mod just for editing and storing addresses... But it kinda felt like taking a sledgehammer to a fly (or however the saying goes) and I ended up just copying and pasting stuff from MC...

Long story short I end up scrapping that and made an MC module for the interaction and the dictionary of edited addresses and lots instead (Which is pretty much back to where I started I know) But I'm pretty satisfied with it for now - storing and reapplying the edited addresses at loadup works as expected.

icarus_allsorts
Reactions:
Posts: 213
Joined: March 8th, 2012, 6:00 pm

Post by icarus_allsorts » May 21st, 2014, 8:24 am

You're right in that the changes don't go into the world file. The way I imagine it happening is that when the game needs a lot's address it checks the "address key" for the lot and if it isn't yet assigned to grabs the address from the world file and assigns it to the key. But once a value is assigned to the key (whether by the game or in this case the mod) the game will no longer look in the world file for the address anymore, it will just take the key value and use it as the lot's address. In order to make sure the addresses survive after quitting and loading (which they won't by default) they have to be stored by the mod and reassigned at every loadup.

I think I'll give turning it into a totally separate mod another try. I know it's totally doable without MC's framework (which I admit was a crutch for me in this case) - in fact, it'll probably much easier for me to do it as a simple lot/terrain interaction mod since that's what I'm used to.

If that works out, would be it okay to upload it here (with the code so that it can be absorbed into another mod eventually perhaps)?

User avatar
Chain_Reaction
Site Admin
Reactions:
Posts: 7609
Joined: December 30th, 2011, 6:00 pm
Answers: 81
Contact:

Post by Chain_Reaction » May 21st, 2014, 8:32 am

...Would it fit into a mod about maptags and custom lot types?

Post Reply