Where is Mt. Pleasant on the map? How do you add map markers through reading a news paper?
The town of Mount Pleasant is located in the dead centre of the state of Michigan, roughly east from Saginaw.
Now, the problem with newspapers is, that in purely mechanical sense player newer actually interacts with them (the whole article is just a very long item name, nothing more) so they cannot give/take any conditions or cause any encounters, which would be necessary to add a new waypoint to the map.
Only an encounter (story board showing up) can add one of those.
You could add something different, like a readable document or conversation with someone, that would trigger the location, but the newspapers cannot do it.
Okay, How do you add locations to the map and change what hex they appear as? Do you have to copy the Maps.xml file, make everything 0:X, then add your place where you want it? Is there a different way that won't cause incompatibilities with other mods? How do you make the area surrounding it a specific tile type, like ZomZom's has the rubble.
To add location label on a map is actually pretty simple - just make an encounter, set it's "aMinimapHexes" to something that looks like this: "AxB=Name", where "A" is X and B is Y coordinate on the map and put any name you want to appear on the map.
So, for example, if player triggers an encounter with "aMinimapHexes" set to "25x90=Mt. Pleasant", it will make that name appear on hex with coordinates X=25, Y=90.
But that will only show the name on the map (both main map and mini-map), noting more. To make anything happen there, you will have to create another thing - an entry for the "encountertriggers". It should look something like:
In nEncounterID you'll need to put the ID of encounter to make anything happen once player enters the hex. In the aArea you set X, Y (which should be the same as the ones for the map label, obviously) and range (0 means that it only triggers when player actually enters the hex, 2 would mean that the encounter will trigger if player is at least 2 hexes away from the point set by the coordinates).
That should be enough to set a simple triggerable location. The exact coordinates, BTW, are really rather hard to locate (because it is a hex- and not square-based map) but basically, the (0,0) point is the top, rightmost hex on the game map. So (25, 90) means 25 hexes right and 90 down from that point. Which should be around where you might look for the real Mount Pleasant - on the game map, 10 hexes straight above the ATN enclave.
What do these fields do?
What would I have to do to change what hex image it appears as and the Hex images of the area around it?
The construction of most of the data tables are described here in the documentation thread.
But to answer shortly:
nItemsID - an ID for treasure table that contains all the options player will be able to choose during that encounter (icons of actions)
nCreatureID - if the encouner is to spawn a creature, it's that creature's ID
ptCreatureHex - coordinates on which the creature from above is to spawn
ptTeleport - if the encounter is to move player somewhere, that's the coordinates where
ptEditor - unimportant (note for dev's personal editor)
nType - 0=normal encounter, 1=scavenging encounter,2=battle,3=hacking
fLootChance - if scavenging encounter, what is % chance to find loot (1.0=100%, 0.23=23%), a.k.a. Loot bar in scavenging
fAccidentChance - if scavenging encounter, what is the chance of accident, a.k.a. Safety bar
fCreatureChance - if scavenging encounter, what is the chance of creature spawning nearby, a.k.a. Sneak bar
vAccidents - IDs of Accident encounters, if applies
vLoot - ID of loot treasure table, if applies
As you can see, most of those (except the first one, which is important) are really not necessary to make a story encounter and mostly apply to scavenging encounters (such as "Scavenging a crumbling apartment building", etc.).
To change the Hex looks, you actually have to modify the map, which is a big pain in the back to do. You need to copy the map's number grid to your mod, then find the number corresponding to the coordinates you chose (25 column and 90 row, if you chose to stick with the coords I gave you above) and change the number "3" (which means "random tile") into the ID of a tile you want to be there.
Thanks for your help. What is the best way to test that something is there and that everything is working correctly, given that it is a bit of a hike to get there? Is thee any way to show the whole map?
Make yourself a debug item - something that can be "Used" and upon that calls for an encounter which teleports player (one of the options of encounters we talk about earlier) right next to where he needs to be.
Awesome, I got it to create a sprawling metropolis for Mt. Pleasant, but I am running into an issue of making it appear in game under my mod folder. When I overwrite the base map, it appears fine, but when I put it in a maps.xml file in my mod, it odes not appear. Do you have any ideas?
Oh man, so much work for nothing...
Map is one of the things that does not have to be "0:" in order to work with mods. And only map with ID 2 needs to be changed.
Weird, I got it working, sort of, but now it looks completely different, only 3 hexes and not centered. What does moving up and down rows and columns do, it appears it makes it longer horizontal and not vertical.
Yup, that is why dealing with a hex-based map is a major pain in the back. In this particular hex map type, the hexes from each row don't actually "touch" each other horizontally and are instead separated by the ones from rows above and below.
You simply have to make allowance for that when making your map. Or, if you're like me - total math illiterate - trial and error will be your only hope ;)
It actually appears that you can't edit the map in a mod, I "moved" mine over to the root file and it worked fine. Maybe if I put it in a "0" folder within the mod.
Yeah, it has to be done via "Zero" mod.
Yep, hex maps can be a total pain in the rear! I'm still surprised to this day that things like the line-of-sight and AI pathfinding actually work. I had to draw a diagram just like this for myself when I was writing code, because it was hard to keep track of rows/columns :)
Dan Fedor - Founder, Blue Bottle Games
Thank you for your help, now I just need to figure out why the area is appearing as forests, plains, and foothills.
now I just need to figure out why the area is appearing as forests, plains, and foothills
The number you place on the map is an ID from the "hextypes" -1. So to place a forest you put a "4" on the map, because the forest hex ID is 5. That works for all but one hex type. The exception is hextype ID 4 (so a "3" on the map grid). It is "plains" hex theoretically but it would actually generate a random hex instead.
So a "3" on a map is randomized hex, anything else is "hextype ID -1".