ParMak [v0.2] - (Very) Lazy parties, places and people

Users who are viewing this thread

Thanks.
I mean that ParMak doesn't actually read what you have in it. In 0.2 is disabled though, and it has an unchangeable text that says "Unused".
Ikaguia said:
just a question, will it generate module_scenes code too?
you could make it get random scenes from a database.
Maybe. Somewhere in the future. :smile:
 
Lumos said:
Ikaguia said:
just a question, will it generate module_scenes code too?
you could make it get random scenes from a database.
Maybe. Somewhere in the future. :smile:


Here we go:
Code:
http://mbmodwiki.ollclan.eu/Terrain_Hash#Terrain_Codes

Credits goes to cmpxchg8b for the reversing. I suppose you can randomize at least some parts now.
Have fun with the bitmasking. :wink:
 
Swyter said:
Here we go:
Code:
http://mbmodwiki.ollclan.eu/Terrain_Hash#Terrain_Codes

Credits goes to cmpxchg8b for the reversing. I suppose you can randomize at least some parts now.
Have fun with the bitmasking. :wink:
:shock:
OK... Thanks. Um. What do I do with it... ? I've got no idea how to compile this. Is each digit a bit in the hex (possibly oct?) format?
 
Lumos said:
Swyter said:
Here we go:
Code:
http://mbmodwiki.ollclan.eu/Terrain_Hash#Terrain_Codes

Credits goes to cmpxchg8b for the reversing. I suppose you can randomize at least some parts now.
Have fun with the bitmasking. :wink:
:shock:
OK... Thanks. Um. What do I do with it... ? I've got no idea how to compile this. Is each digit a bit in the hex (possibly oct?) format?


Okay, let's suppose you have this terrain hash from the editor... The 0x part means hex notation.
Code:
0x00000001324a9cba0005194a000041ef00005ae800003c55

Turn it into a binary number:
Code:
1001100100100101010011100101110100000000000000101000110010100

And here you have the different parts that compounds the hash... Now the remaining part is to itinerate using logical shifts, pick the number of bytes documented in the table for every itineration. And change them. Take an eye to bitwise operations (AND, OR, XOR,... ).

Sounds more complex that it really is, trust me. Finally, convert it back to hex and you're done. :smile:

I'll expand this a bit more if I find time.
 
Swyter said:
I'll expand this a bit more if I find time.
Please do... I can't understand how the bits are packed in a 61-digit number. IIRC, bits are 1 or 0. Shouldn't this mean that every digit should be a bit...? (Sorry, never bitmasked before. Kinda missed that part of stuff to learn... :oops:)
 
Lumos said:
Swyter said:
I'll expand this a bit more if I find time.
Please do... I can't understand how the bits are packed in a 61-digit number. IIRC, bits are 1 or 0. Shouldn't this mean that every digit should be a bit...? (Sorry, never bitmasked before. Kinda missed that part of stuff to learn... :oops:)

The terrain hash it's actually divided in three parts. Look at the four zeroes sequences:

Code:
0x00000000[b]3a07b23280025896[/b]0000[b]4cbd000028df[/b]0000[b]23c9[/b]
Let's see, following the table we have this:


Code:
··············································
place_river	3	31	1
··············································


In this case is a modifier of a single bit, that is located shifting the 3rd hash 31 positions.
That in practice is doing the following:


Code:
0x3A07B232[color=navy]0[/color]0025896 = 111010000001111011001000110010[color=navy]0[/color]0000000000000100101100010010110
0x3A07B232[color=navy]8[/color]0025896 = 111010000001111011001000110010[color=navy]1[/color]0000000000000100101100010010110

Place river -> [color=blue]1[/color]0000000000000000000000000000000



If you feel more confortable doing it that way...
Use the Terrain editor for getting a hash, alter some options and 'substract' them so you can see the binary differences.



Isn't difficult at all and you're more than accustomed by using the module system. Every piece of code like this...


Code:
[ itp_type_one_handed_wpn|itp_primary|itp_secondary ]

... means you're doing an
Code:
OR
operation, effectively adding the bitwise flag to the compiled properties (take a look to the headers).

For getting every individual switch it's used a modulo/
Code:
AND
operation.
Take a look to Wikipedia. It's fun. And you can pack a lot of information in very little space.

Hope that helps. Looking forward to your works, fellow craftsman.​
 
Forget what I said, didn't even checked it. I'm just plainly idiot.  :neutral:
They're four diferent fields starting by zero. That's the most monumental error.


Code:
0x000000003a07b23200025896000052f280006915800036c4
0x000000003A07B2328002589600004CBD000028DF000023C9
//----> This is the structure. There is a combination of 4 independent keys.

Code:
0x000000003a07b232000258960---52f28---69158---36c4
0x000000003A07B232800258960---4CBD0---28DF0---23C9

Code:
[color=navy]
    ^                 ^        ^        ^
    3                 2        1        0[/color]

That's mostly correct. And anyways I'm doing an addon for Module System Manager that mirrors the in-game hash generator.
For the sake of simplicity. :wink:
 
Lumos said:
What about keys 4 and 5? The table says that some fields need them.

In the last chunk I called
Code:
<3>
to the rest of values packed together.
You don't need them for altering the hash seeding so I thought it was unneeded complexity. *shrugs*

This is my final appointment... What you really need.
I didn't know how to explain everything in a short way while giving you some background of the matter. Maybe I should had started by here. :/

Code:
0x0000000030001181000d208c[color=#E01B4C]000029e1[/color][color=#323F8F]00000afb[/color][color=#5B9E24]00001870[/color]

[color=#5B9E24]-> Terrain Seed -> 00001870 => 6256[/color]
[color=#323F8F]---> River Seed ---> 00000afb => 2811[/color]
[color=#E01B4C]-----> Flora Seed -----> 000029e1 => 24741[/color]

Randomize that, filling with zeroes when needed for keeping the 8 positions per number, and you're done.
The rest of options will be retained.
 
Swy... Just a thought... if you randomize the entire terrain code of the Scene, won't you get scenes where stuff is either embedded 10 feet in the ground, or where you've got stuff floating in the air? This was supposed to make stuff easier, not cause you to HAVE to scene edit. :wink:
 
Specialist said:
Swy... Just a thought... if you randomize the entire terrain code of the Scene, won't you get scenes where stuff is either embedded 10 feet in the ground, or where you've got stuff floating in the air? This was supposed to make stuff easier, not cause you to HAVE to scene edit. :wink:

I suppose that changing values close to the current seed will make new places with a minimal retouch.
Maybe randomizing the flora will be enough for adding an unique feel to every scene.

You can then visit them later and move the props a little. Or pasting different versions of the SCOs as TaleWorlds itself does.

It's a good plan.
We're lazy, but not to the point of leaving the mod making itself. Isn't it?  :smile:
 
cmpxchg8b said:
Even the slightest change to a seed will make the sequence of random numbers generated completely different, so there isn't much that can be done with it.
Thanks for leaving me in evidence. Sure, you're right. I'll spend more time from now doing the monkey in the cryptography section of Wikipedia. :smile: You're the hax0r after all.

@Lumos, Waiting for your implementation.
 
Swyter said:
Specialist said:
Swy... Just a thought... if you randomize the entire terrain code of the Scene, won't you get scenes where stuff is either embedded 10 feet in the ground, or where you've got stuff floating in the air? This was supposed to make stuff easier, not cause you to HAVE to scene edit. :wink:

I suppose that changing values close to the current seed will make new places with a minimal retouch.
Maybe randomizing the flora will be enough for adding an unique feel to every scene.

You can then visit them later and move the props a little. Or pasting different versions of the SCOs as TaleWorlds itself does.

It's a good plan.
We're lazy, but not to the point of leaving the mod making itself. Isn't it?  :smile:

True Swyter. If I could leave mod developing to itself, I would though. That way I could take a week long break and have a decent mod near the end of that week. :lol:
 
Thanks. :smile:
I have a partly working 0.3 version, should I upload it? It contains a replacer.
Imagine that you have 400 vilages with the same rotation, but with proper coordinates (so you can't replace them with newly-generated). Looks pretty ugly on the map, no?
So you open the replacer up, put 400 villages with different rotations in the first box and your 400 same-rotationed villages in the other one, click Parties/Rotation, click Replace and the 400 villages with proper coords now have different rotations - they receive teh rotation of the ones in the first box.
I also have a fix or two - some of the copy/clear stuff isn't connected properly.
 
Back
Top Bottom