Author Topic: Adding Locations to World Map  (Read 3656 times)

Adding Locations to World Map
« on: May 30, 2015, 12:55:14 am »
I looked all over the Internet, trying various variations in search Google, but I cannot seem to find an answer to this.

I'm working on a map, with some NPCs and a "quest" attached to it. I say "quest" since it's really just a string of dialogue reacting to items in the player's inventory. I dunno how to do a real quest. That's not a priority as of now.

I tried messing with the world editor. And, by data, it kinda worked. I find in files that its been added, I can see the World Editor created a new PID for the location and the map. It comes up like this in Locations.cfg

Quote
[Area 90]
name=tutorial
size=24
visible=1
auto_garbage=0
geck_visible=0
max_players=1
map_0=tutorialcavebg2 128
entrance=1
#@IsPublic=1

_maps.fos

Quote
#define MAP_TutorialCave                                 (128) // tutorialcavebg2, tutorial(90)

and

GenerateWorld.cfg

Quote
@ 90 1623 1977

I added the map with Mapdata Editor, the location with Location Editor, plopped the location down on the map near Hub, set location to visible, and generated _maps.fos.

Before I generated _maps.fos it simply wasn't showing up. Even using clean.bat it wouldn't show up.

After generating the _maps.fos, I'm now getting an error.

Quote
[00:029] FOnline server, version 0506-EC.
[02:253] ***   Starting initialization   ****
[02:258] Script system initialization...
[02:270] Reload scripts...
[05:054] Script message: map_bhcave : Info : Compiling uint e_RespawnLocation(uint[]@) : 3246, 1.
[05:054] Script message: map_bhcave : Error : 'LOCATION_BountyHuntersCave' is not declared : 3250, 34.
[05:055] Script::LoadScript - Unable to Build module<map_bhcave>, result<-1>.
[05:055] Load module fail, name<map_bhcave>.
[05:887] Script message: cheats : Info : Compiling void SetAliases() : 3812, 1.
[05:887] Script message: cheats : Error : 'MAP_Cubik' is not declared : 3901, 19.
[05:887] Script message: cheats : Error : 'MAP_BarterGround' is not declared : 3902, 16.
[06:123] Script::LoadScript - Unable to Build module<cheats>, result<-1>.
[06:123] Load module fail, name<cheats>.
[06:235] Script::BindImportedFunctions - Fail to bind imported functions, module<main>, error<-19>.
[06:270] Script::BindImportedFunctions - Fail to bind imported functions, module<critter_item_movement>, error<-19>.
[06:405] Script::BindImportedFunctions - Fail to bind imported functions, module<weather>, error<-19>.
[06:413] Script::BindImportedFunctions - Fail to bind imported functions, module<sleepiness>, error<-19>.
[06:519] Script::BindImportedFunctions - Fail to bind imported functions, module<npc_schedule>, error<-19>.
[06:656] Script::BindImportedFunctions - Fail to bind imported functions, module<unsafe_client>, error<-19>.
[06:727] Script::BindImportedFunctions - Fail to bind imported functions, module<dev_menu>, error<-19>.
[06:735] Script::BindImportedFunctions - Fail to bind imported functions, module<gmtools>, error<-19>.
[06:738] Script::BindImportedFunctions - Fail to bind imported functions, module<broadcast>, error<-19>.
[06:738] Script::BindImportedFunctions - Fail to bind imported functions, module<eventboss>, error<-19>.
[06:738] Reload scripts fail.
[08:181] Reload scripts fail.
[08:181] Initialization fail!

I'm severely confused. I'm simply wanting to make some maps for another server, Reloaded, but would like to test the maps I create.

So far the only thing I know how to do is make maps and attach dialogue to NPCs. But I need to know how to find a way to enter the map to test it out.

I'm perfectly willing to do another clean install of the server information, aside from the maps I'm working on, and have a step-by-step way to get the maps loaded up.

I can't find a lot of information on this subject, just making maps themselves. Which, while nice, feels like only part of the job.
« Last Edit: May 30, 2015, 12:56:47 am by Apostle »

Offline Wipe

  • Rotator
  • Random is god
Re: Adding Locations to World Map
« Reply #1 on: May 30, 2015, 05:25:07 pm »
[05:054] Script message: map_bhcave : Error : 'LOCATION_BountyHuntersCave' is not declared : 3250, 34.
[05:887] Script message: cheats : Error : 'MAP_Cubik' is not declared : 3901, 19.
[05:887] Script message: cheats : Error : 'MAP_BarterGround' is not declared : 3902, 16.
Most likely these 3 defines was added by hand, and after regenerating _maps.fos they disappeared. Adding yours manually [after restoring _maps to working state, ofc] should do the trick.

So far the only thing I know how to do is make maps and attach dialogue to NPCs. But I need to know how to find a way to enter the map to test it out.
Not counting obvious way, which is GenerateWorld.cfg, on 2238-based servers you can you use `createlocation [locationPid] (-t) cheat to spawn map for tests; in this case it will be `createlocation 90. If used with -t argument, which is optional, you'll be teleported to default entrance of first map after location is created. Can be useful for testing maps which are not visible by default [encounters, quests, etc.]
Games are meant to be created, not played...

Re: Adding Locations to World Map
« Reply #2 on: May 31, 2015, 05:15:26 am »
Ah, that worked. So do as I was doing, but add the _maps.fos info by hand and use the createlocation command, and it'll add the location relative where the admin account is. And deletelocation to remove it. Easy.

Thank you for your help. I have a few mapper related questions, and as to not fill this board up with them, I'll post them here.

1. I notice that when testing the map, the camera tends to get stuck if I go out too far. Does that happen when it's just hitting the edge of the map? I think scroll blockers should help?
2. This map should have a regular workbench for people to use. How would I change the workbench from being just a container to activating their fixboy so they can make some normal guns?
3. Additionally, I'd liked to change the model from the normal workbench by itself to having the toolboard above it. When I placed the workbench down, I noticed that it had two models, one with the toolboard, I wanted to switch to that one, but couldn't figure out how to do so.

I may have a few more questions, but nothing I can think of right now.

Thank you for the help, however.

Offline Lexx

  • Rotator
  • Mexican Apple Thief
Re: Adding Locations to World Map
« Reply #3 on: May 31, 2015, 07:41:58 am »
1. Yes, you obviously need scroll blockers. Best results are with placing them in a square form. []

2. You have to add a script to the object. Look at the original maps and see how it was done there.

Re: Adding Locations to World Map
« Reply #4 on: June 03, 2015, 08:21:09 am »
Actually, telling me to look at other maps was quite helpful and that helped answer an amazing amount of other questions I would have had. For instance, it helped me set up a merchant and helped with question 3.

But even doing so has left me stumped with one. See, I want to put two veins down, an iron and mineral one. The player can mine them out as well as a tree, to make a 10mm and some ammo.

While that part is doable, I come across two problems:

1. The mines don't fade out. They're still upon the mines running out of materials. The message says it's depleted, but they don't "Fade away."
2. I'd like to limit the amount of resources that is able to be grabbed by these veins and trees. Maybe about 4-5 strikes per mine, rather than the normal 7-8. So it's only about 8-10 iron and minerals, and only a handful of wood. And wood, I'd like the trees to be cut down only in 2 chops. 

The resource amount isn't too big of a deal, but I don't want the player to be gaining too many experience from here due to crafting. It's meant to be a starting zone.

After the mines and trees are gone, I don't want them to replenish. Mines particularly, I just want them to fade away.

I tried looking up the Junktown Mine from Reloaded but nothing there told me how they made the veins fade out. I tried using the shuffler, but it didn't really help. The properties of the shuffler and the veins are identical to the JT, short of location, but that doesn't seem to do anything, I'm probably missing something. (With shufflers I was going to have it shuffle the other mines just outside the scrollblockers)

Any help in quantity and fading here would be excellent.

There is a final thing, is there a way to make lockpicking a door absolutely guaranteed or at least extremely likely?

I made a door locked and the player has to use lockpick to open it, as to teach the player how to use skills. I made the door locked and set the complexity to 0.  I started out a character with 1 agility and 1 perception, lockpick skill was 16. And he failed a lot. I tried giving him a lockpick set, then expanded, which would jump his skill to 41/66 and he still failed a lot.

This is something of a tutorial map, and failing a lot would be very detrimental to progression. I could ignore that part, yes. But a lot of things use skills.

Think of this lockpick as a type of call back as Temple of Trials.
« Last Edit: June 03, 2015, 08:23:04 am by Apostle »