I need help add terrains in new game versions to my Wesnoth 1.10 add-on

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Misaghhhh
Posts: 6
Joined: April 14th, 2023, 4:50 pm

I need help add terrains in new game versions to my Wesnoth 1.10 add-on

Post by Misaghhhh »

Hi everyone, english is not my native language so i'm sorry if i'm making any grammar mistake.

I need help add terrains like Aquatic Encampment and keep in new game versions to my old Wesnoth 1.10 add-on.

you might think why doesn't he simple play latest game version, my answer is i prefer wesnoth 1.10 because this version game code is simple enough that i can understand and edit it and units graphics is simple but beautiful, and i put a lot of time in creating my own add-on for 4p-A New Land which i can't port to new game versions.so...

is it possible? :|

if yes, i well be very grateful if someone can point me to a complete and simple guild or tell me what files i need to edit.

i search the forums and find some topics about add new terrains,i know i need to create and edit this files in my add-on:

I add this code to my add-on _main.cfg file:

Code: Select all

#ifdef EDITOR
	[binary_path]
		path=data/add-ons/DefaultPlus/
	[/binary_path]

	{./terrain/}

	[editor_group]
		id=NT
		name= _"New Terrains"
		icon=group_custom
	[/editor_group]
#endif
I create a terrain folder and terrain.cfg file and add this code to terrain.cfg file:

Code: Select all

#include any terrain graphics macros you have first
{./terrain-graphics}

#
# Castles
#

[terrain_type]
    symbol_image=castle/aquatic-camp/tile
    id=aquatic_camp
    name= _ "Encampment"
    editor_name= _ "Aquatic Encampment"
    string=Cme
    aliasof=Ct,Wrt
    submerge=0.3
    unit_height_adjust=0
    recruit_onto=yes
    editor_group=NT
[/terrain_type]

#
# Keeps
#

[terrain_type]
    symbol_image=castle/aquatic-camp/keep-tile
    id=merman_campkeep
    name= _ "Encampment Keep"
    editor_name= _ "Aquatic Encampment Keep"
    string=Kme
    aliasof=Ct, Wrt
    unit_height_adjust=2
    recruit_onto=yes
    recruit_from=yes
    editor_group=NT
[/terrain_type]
I create a terrain-graphics.cfg file in terrain folder and add this code to terrain-graphics.cfg file:

Code: Select all

{NEW:OVERLAY             (Cme)                                             castle/aquatic-camp/reef      FLAG=reef    LAYER=-320}

#####################
# Aquatic camp

{NEW:CASTLEWALL             (Kme,Cme)     (!,C*,K*,Xu*,Xo*)     !,Ket,!,C*,Ke*    castle/aquatic-camp/castle}
{AQUATIC:CAMPS              Kme           Cme                               castle/aquatic-camp}

# 33% is an arbitrary magic number with which the transparency looks good
{NEW:GENERIC_CORNER_TRANSITION Cme         (Cm,Km,Chw)   -330 castle/aquatic-camp/reef      masks/long "~O(33%)" FLAG=aquaticbasetrans}
{NEW:GENERIC_CORNER_TRANSITION Cm,Km,Chw   (Cme)         -321 castle/aquatic-castle/cobbles masks/long "~O(33%)" FLAG=aquaticbasetrans}
i simple copy/paste any line with Cme and Kme, i don't understand this part at all. :doh:

and add terrains graphics to my add-on images/terrain/... folder

but i get macros error all the time. :augh: :(

is there any other file i need to add or edit in my add-on or i'm doing something wrong? :hmm:

thanks :)
Attachments
1.png
User avatar
octalot
General Code Maintainer
Posts: 786
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: I need help add terrains in new game versions to my Wesnoth 1.10 add-on

Post by octalot »

The NEW:OVERLAY macro was itself added in 1.13.7, in commit 8fdf689681ce03edf7aea44f24981614ca49157f. Aquatic Camps were first added in 1.13.6, so there must be a simpler version of them in that first release.
User avatar
Misaghhhh
Posts: 6
Joined: April 14th, 2023, 4:50 pm

Re: I need help add terrains in new game versions to my Wesnoth 1.10 add-on

Post by Misaghhhh »

Thanks octalot :)
I'm going to take a look at the link and 1.13 version and search the forums a little more, see if i can make it work . :geek: ^_^
Post Reply