ghype's Problems:
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.
Re: ghype's Coding Problems
Thanks, I made it work.beetlenaut wrote: ↑November 22nd, 2020, 12:31 pm The PLACE_IMAGE macro is for adding items to a hex like a storm trident or ring, so that's why it doesn't work now. You should use the map editor to make a map that has your tile in it. You just need the tile at the position marked "1", and the graphics will fill in the rectangle you defined. (You can also use [terrain] inside an event to modify a tile on the running map.)
stuff I worked on: Dunefolk Rework - ghype's Daily Art
Re: ghype's Problem: [remove_shroud]
New Problem:
I am unsure how the [remove_shroud] works.
I plan to have a certain area's shroud to be removed when moving on a certain hex using this:
But all it reveals is a tiny spot instead of the full radius at the given coordinates.
I am unsure how the [remove_shroud] works.
I plan to have a certain area's shroud to be removed when moving on a certain hex using this:
Code: Select all
[event]
name=moveto
first_time_only=yes
[filter]
x,y=49,43
[/filter]
{MODIFY_TERRAIN Iwr^Pw\o (48,48) (43,43)}
[remove_shroud]
x=46
y=45
raduis=3
[/remove_shroud]
[/event]
stuff I worked on: Dunefolk Rework - ghype's Daily Art
Re: ghype's Problem: [remove_shroud]
I'm pretty sure there's a typo there (
raduis=3
-> radius=3
)Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Re: ghype's Problem: [remove_shroud]
well thanks about that! sign of being too late. it works as it should.
stuff I worked on: Dunefolk Rework - ghype's Daily Art
Re: ghype's Problem: [side] + custom unit
So here a question for a scenario. I have a
[side]
defined for a scenario and want to use custom unit as leader. It all works if I use a default unit, but once I replaces with a custom unit, the scenario gives me the "defeated" message. I suppose something is wrong with the custom unit I coded although I already coded in the past so many of them for my era. I cannot figure out what might be wrong. My[binary path]
should be ok as well, so I really cannot tell what's missing.Code: Select all
[side]
side=1
controller=human
type=PL_Khyret_Civilian
id=Khyret
name= _ "Khyret"
unrenamable=yes
canrecruit=yes
shroud=yes
defeat_condition=no_leader_left
x,y=50,42
[/side]
Code: Select all
[unit_type]
id=PL_Khyret_Civilian
name= _ "Khyret"
race=dunefolk
image="units/dunefolk/khyret-civilian.png"
hitpoints=41
movement_type=dunefoot
movement=5
experience=43
level=1
alignment=liminal
advances_to=PL_Khyret_Armored
cost=18
usage=fighter
description= _ "Hero Description"
die_sound={SOUND_LIST:HUMAN_DIE}
[/unit_type]
Code: Select all
#ifdef Plagued
[binary_path]
path=data/add-ons/Plagued/
[/binary_path]
[units]
{~add-ons/Plagued/units}
[/units]
{~add-ons/Plagued/utils}
{~add-ons/Plagued/maps}
{~add-ons/Plagued/scenarios}
{~add-ons/Plagued/images}
#endif
stuff I worked on: Dunefolk Rework - ghype's Daily Art
Re: ghype's Problem: [side] + custom unit
One thing that comes to mind: that should definitely be
[+units]
, not [units]
. Campaigns should expand the core units tag, not overwrite it.Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
- Lord-Knightmare
- Discord Moderator
- Posts: 2363
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: ghype's Problem: [side] + custom unit
From what I have seen in Discord discussions, the
[+units]
thing was a workaround for a bug that has been fixed for quite some time now. However, UMC authors, such as you and I, still end up using [+units]
since it's sort of a convention by now.@ghype: Your
#ifdef
does not need to load the images and maps directories. If you do include those directories, your campaign would take longer to load.May I see the entire scenario file code? From your snippets, I am unable to discern what's causing the instant "defeat" message.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
ghype's Problem: lua error + custom unit
That the
[+units]
is written without the [+]
is something that I have seen in many custom campaigns and even if I type it with the [+]
i still get defeated immediately. As I assume that there is an error with unit type and not the scenario, I tried to spawn that unit external with a custom "spawn unit" macro.Now I get a lua error, which I have not before as I directly jumped to the defeat_condition:
While I opened the correspondent lua files, I could not get any good information out it as I don't know it's language.
I just saw your message when I was about to post my answer. the lua error posted might help you identifying the problem.Lord-Knightmare wrote: ↑November 25th, 2020, 4:33 pm May I see the entire scenario file code? From your snippets, I am unable to discern what's causing the instant "defeat" message.
Regarding the
[+units]
... do i close it like [/+units]
or it remains [/units]
?stuff I worked on: Dunefolk Rework - ghype's Daily Art
Re: ghype's Problem: [side] + custom unit
I must have missed that then, but I don't understand. TheLord-Knightmare wrote: ↑November 25th, 2020, 4:33 pm From what I have seen in Discord discussions, the[+units]
thing was a workaround for a bug that has been fixed for quite some time now. However, UMC authors, such as you and I, still end up using[+units]
since it's sort of a convention by now.
+
is the amendment syntax, namely it lets you expand the core [units] tag, first defined in core/units.cfg, and lets you add your umc's content. How was this a workaround, and why is defining it a second time (without + sign) supposed to work?EDITED to just made post:
The closing tag stays
[/units]
.Is it just this one unit that causes this error? I mean, are the other custom units under {~add-ons/Plagued/units} visible and spawnable? If not, then something's wrong with the path, if yes, then it's probably indeed something with the unit.
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
- Lord-Knightmare
- Discord Moderator
- Posts: 2363
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: ghype's Problem: [side] + custom unit
It seems as though your custom unit has not been imported into your campaign. May I assume that you have subdirectories in the units folder? If so, you have to include them.Now I get a lua error, which I have not before as I directly jumped to the defeat_condition:
Regarding the [+units] ... do i close it like [/+units] or it remains [/units]?
Code: Select all
[+units]
{~add-ons/YOUR_ADDON/units}
[/units]
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: ghype's Problem: [side] + custom unit
Yes I do have indeed.Lord-Knightmare wrote: ↑November 25th, 2020, 4:47 pm It seems as though your custom unit has not been imported into your campaign. May I assume that you have subdirectories in the units folder? If so, you have to include them.
stuff I worked on: Dunefolk Rework - ghype's Daily Art
- beetlenaut
- Developer
- Posts: 2825
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: ghype's Problem: [side] + custom unit
We are just throwing out guesses because we can't see all your code. If you post your campaign like Lord-Knightmare suggested, we would be able to solve your problem quickly. (Use a zip file.)
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
Re: ghype's Problem: [side] + custom unit
my bad. it sounded he was onto something.
just note that the custom images contained in this zip here are all WIP and not representing the final versions.
just note that the custom images contained in this zip here are all WIP and not representing the final versions.
Last edited by ghype on November 25th, 2020, 6:36 pm, edited 1 time in total.
stuff I worked on: Dunefolk Rework - ghype's Daily Art
- Lord-Knightmare
- Discord Moderator
- Posts: 2363
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: ghype's Problem: [side] + custom unit
The problem is where I suspected. Your custom unit is in
units/dunefolk
but you are not including that subdirectory in your [+units][/units]
. Thus, it will never be loaded in game. You have to include it with:
Code: Select all
#ifdef Plagued
[binary_path]
path=data/add-ons/Plagued/
[/binary_path]
[units]
{~add-ons/Plagued/units}
{~add-ons/Plagued/units/dunefolk}
[/units]
{~add-ons/Plagued/utils}
{~add-ons/Plagued/maps}
{~add-ons/Plagued/scenarios}
{~add-ons/Plagued/images}
#endif
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
- beetlenaut
- Developer
- Posts: 2825
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: ghype's Problem: [side] + custom unit
You also have to fix the end tags of the attacks in the unit file or it will still fail to load.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide