Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faction cant be read from chardef #1083

Closed
GladieUO opened this issue Jul 4, 2023 · 2 comments
Closed

Faction cant be read from chardef #1083

GladieUO opened this issue Jul 4, 2023 · 2 comments

Comments

@GladieUO
Copy link
Contributor

GladieUO commented Jul 4, 2023

Faction on npcs cant be read from chardef. Im setting the faction in on@create.

image

with .xshow faction
image

@DavideRei
Copy link
Contributor

DavideRei commented Jul 7, 2023

You can't read properties declared under @create with serv.chardef

I think that faction should work in chardef.
Otherwise all the sphere x chardef scripts are wrong

@xwerswoodx
Copy link
Contributor

xwerswoodx commented Oct 3, 2023

Honestly as DavideRei said you can't get variables set after char created by using chardef or itemdef etc. Because the values is not saved on anywhere as they defined after you created the npc.

The only way to get these variables ia spawning invisible new npc and get the variable and remove it. Or you can place one hidden in your star chamber and you can put it's uid to your scripts for checks. Or you can search map with forchars to get one npc with same id to take info from him.

This is not a bug at all, serv.chardef is for the properties that defined inside [chardef c_...] section. Any property defined under triggers cannot be readn with it.

@GladieUO GladieUO closed this as completed Oct 3, 2023
cbnolok pushed a commit that referenced this issue Oct 11, 2023
* Couple of Fixes and Feature Updates (#1120)
- Fixed: Re-Coded @KarmaChange and @FameChange triggers not setting variables correctly. (Issue #1118)
	ARGN1 now return as the amount of Karma/Fame being added.
	LOCAL.OLD and LOCAL.NEW removed, while ARGN1 is writeable, it's impossible to track that values in the trigger.
	ARGO now return the source of karma/fame income if exists.
- Added: @KarmaChanged and @FameChanged triggers to track Karma/Fame changes after @KarmaChange/@FameChange triggered.
	ARGN1 returns the amount of Karma/Fame being added.
	LOCAL.OLD returns the karma value before added anything.
	LOCAL.NEW returns the current player karma.
	This trigger has no RETURN value to block hardcoded events while it triggers after everything finished.
- Fixed: f_onchar_create_init is not called. (Issue: #1117)
- Fixed: IF and QVAL statements cannot evaluate correctly 32bit+ bitwise conditions. (Issue: #1078)
- Added: @PartyAdd trigger. (Feature Request: #1054)
	I: The player who is joining to the party.
	SRC: The player who is inviting.
	Return 1: Cancels the action.
- Added: LOCAL.SOUND and LOCAL.ANIM under @start (Skill) and @SkillStart triggers to override sound and animations before start crafting or gathering.
- Fixed: FACTION property not saved and load correctly under [CHARDEF] definition. (Issue: #1059 and #1083)
- Added: COMBAT_PARALYZE_CANSWING flag.
- Fixed: pet issue of AttackingIsACrime.
- Added: Added CAN_I_EQUIPONCAST (08000000) flag for items to let scripters customize allowed items while EquippedCast disabled.
- Fixed: Spells can trigger @success triggers and play animations if they paralyzed after selected skill.
- Fixed: Motivation < 0 causes STATF_WAR flag stay infinitely on characters. (Issue: #517)
- Fixed: The issue where characters can spawn out of the rooms. (Issue: #1084)
- Fixed: More1 and More2 values readn as integer instead of dword (unsigned integer) (Issue: #784)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants