Recent Posts

Pages: [1] 2 3 ... 10
1
Tools / Re: FOClassic-Map-Converter
« Last post by raynor009 on November 26, 2022, 11:56:54 am »
God bless. This saved me a bunch of work right now.
2
Tools / FOClassic-Map-Converter
« Last post by Slowhand on November 25, 2022, 05:58:18 pm »
FOClassic-Map-Converter

This is a tool I made to convert map files from other versions of FOnline that are not compatible with FOClassic/SDK2238/Reloaded versions.

Open source in Java on GitHub: https://github.com/Sasabmeg/foclassic-map-converter

For those too laze to try it, or only need it to convert the TLA mk2 maps, here are the converted samples with pictures of each map for convenience:
Maps: https://github.com/Sasabmeg/foclassic-map-converter/tree/main/sample/out
Pics: https://github.com/Sasabmeg/foclassic-map-converter/tree/main/sample/pics

Detailed description of the tool Soon TM.

First, you need to have JRE8 installed. The tool is written in Java, you can run it from console. (f.e.: java -jar foclassic-map-converter.jar -h )

The conversion is a 3 step process:
  • Generate item proto mapping file from generic proto files usually found at /server/proto/items/ for both source and target.
    • This is the more important proto mapping, because this handles more than 90% of an average map. Everything in the fomap file that is in the [Tiles] section and in [Objects] section but does not start with 'MapObjType 0' is not a Critter, so it falls into items proto category.
    • The Item proto mapping is strongly checked against FOClassic structure and will warn in log file if unknown attributes are found.
    • The output of this conversion in a proto mapping file, containing the proto ID's to map in first two columns. It is also verbose, as it contains the art path and filename, to supply information for manual changes if necessary. If you run the covnert.bat this file will be named items_verbose.mapping
    • Example: java -jar foclassic-map-converter.jar -gipm out\items_verbose.mapping -pms resources\tlamk2\proto\items\ammo.fopro resources\tlamk2\proto\items\armor.fopro -pmt resources\foclassic\proto\items\ammo.fopro resources\foclassic\proto\items\armor.fopro -lp out -ll error
      • -gipm --generateItemProtoMappingFile filename and relative path to generate the item proto mapping to.
      • -pms --protoMultipleSources item proto mapping source files (map/convert proto from), you can give multiple source files.
      • -pmt --protoMultipleTargets item proto mapping target files, (map/convert proto to) you can give multiple target files.
      • -lp --logPath logs will be created in this folder.
      • -ll --logLevel can be info, warning or error.
  • Generate critter proto mapping file from critter proto files usually found at /server/proto/critters/ for both source and target.
    • This is the less important proto mapping, because critters are more personalized for target maps and also because it's almost impossible to get a good pivot point to connect the two sdk versions. Everything in the fomap file that is in the [Objects] section and does  start with 'MapObjType 0' is a Critter, so it falls into this proto category.
    • The critter proto mapping is not checked against FOClassic structure and it will copy over most attributes. The pivot point are two attributes: ST_BASE_CRTYPE and ST_BODY_TYPE
    • The output of this conversion in a proto mapping file, containing only the proto ID's to map in first two columns. If you run the covnert.bat this file will be named critters.mapping
    • Example: java -jar foclassic-map-converter.jar -gcpm out\critters.mapping -pms resources\tlamk2\proto\critters\ammo.fopro resources\tlamk2\proto\critters\armor.fopro -pmt resources\foclassic\proto\critters\ammo.fopro resources\foclassic\proto\critters\armor.fopro -lp out -ll error
      • -gcpm --generateCritterProtoMappingFile filename and relative path to generate the critter proto mapping to.
      • -pms --protoMultipleSources item proto mapping source files (map/convert proto from), you can give multiple source files.
      • -pmt --protoMultipleTargets item proto mapping target files, (map/convert proto to) you can give multiple target files.
      • -lp --logPath logs will be created in this folder.
      • -ll --logLevel can be info, warning or error.
  • Use the two proto mapping files above to convert the fomap file.
    • Example: java -jar foclassic-map-converter.jar -ms resources/tlamk2/maps/barter_ground.fomap -mt out/barter_ground_converted.fomap -ipm out/items_verbose.mapping -cpm out/critters.mapping[/color -lp out -mph remove -ll error
      • -ms --mapSourceFile filename and relative path to fomap file to be converted.
      • -mt --mapTargetFile filename and relative path to conversion result.
      • -ipm --itemProtoMapping item proto mapping file to be used for conversion.
      • -cpm --critterProtoMapping critter proto mapping file to be used for conversion.
      • -lp --logPath logs will be created in this folder.
      • -mph --missingProtoHandling can be ignore, remove or replace. Replace not features atm and remove is strongly recommended.
      • -ll --logLevel can be info, warning or error.

You can use the convert.bat or convert_all.bat to do the whole process in one go. Make sure the follow the folder structure regarding resources and output.
Examples:
  • convert.bat resources\tlamk2\maps\barter_ground.fomap resources\tlamk2\proto resources\foclassic\proto out
  • convert.bat resources\tlamk2\maps\barter_ground.fomap resources\tlamk2\proto resources\foclassic\proto out
  • Notes:
    • Both assume that critter and item proto files have fopro textension. In case of FOClassic critters, this is not true, so you might want to rename them manually before setting up this folder structure.

3
FOnline Projects / Re: FOnline: TLA mk2 source
« Last post by Slowhand on November 25, 2022, 05:50:08 pm »
First, thank you for the contribution.

Second, for those who are using a different version of FOnline, I made a foclassic-map-converter, that will convert these maps to a specific version, automatically generating item and critter proto mapping.
In the case of FOClassic or FOnline 2238/Reloaded compatible users, I made a repo with converted maps added, and also for my convenience and others, a folder with pictures about the map. There are 400 maps there and it's just easier to browse in an image viewer.
Converter: will add to tools section on this website Soon TM ( https://fodev.net/forum/index.php/topic,30579.0.html )
Maps: https://github.com/Sasabmeg/foclassic-map-converter/tree/main/sample/out
Images to browse maps: https://github.com/Sasabmeg/foclassic-map-converter/tree/main/sample/pics

I only tested in mapper tbh, so some surprises may arise... gl, hf :)
4
Questions and Answers / Re: few mapper questions
« Last post by Tit0 on November 23, 2022, 10:11:19 am »
Time you can easliy change in map, just open .fomap file of your map by notepad or other editor. There you have something like that...
[Header]
Version              4
MaxHexX              640
MaxHexY              480
WorkHexX             378
WorkHexY             173
ScriptModule         map_arena
ScriptFunc           map_init
NoLogOut             0
Time                 -1
DayTime              300  600  1140 1380
DayColor0            18  18  53
DayColor1            128 128 128
DayColor2            103 95  86
DayColor3            51  40  29

Line with Time = -1 means global time if you want change it set another value for example time = 600 than you get pernamently dawn.
For other 2 questions I think you have to do this via scripts.
5
FOnline Projects / Re: FOnline: Desert Europe SDK
« Last post by raynor009 on November 20, 2022, 12:05:27 am »
thanks, these old dead projects are sometimes a treasure trove of resources
6
FOnline Projects / Re: FOnline: Desert Europe SDK
« Last post by remake on November 19, 2022, 08:28:04 am »
7
FOnline Projects / Re: FOnline: Desert Europe SDK
« Last post by raynor009 on November 18, 2022, 09:29:36 pm »
anyone still have the client?
8
Questions and Answers / few mapper questions
« Last post by raynor009 on November 14, 2022, 05:52:58 pm »
How do I make maps that can have static time independent of global time? Like maybe I want some maps to be permanently dawn.
Next, how do I make maps have constant rain? And is it possible to change the color of the rain drops and maybe not make them as dense?
And is it possible to make scenery or objects emit radiation through the mapper?
Pages: [1] 2 3 ... 10