Skip to content

EA 23.300 Nightly โ€‹

May 1, 2026

13 files modified.

Important Changes โ€‹

Possible breaking changes. Click the filename to view the chunk.

ModUtil (1) โ€‹

cs
public static ModPackage GetModPackage(string modId) 

AI_Idle โ€‹

public override IEnumerable<Status> Run()

cs
			{
				break;
			}
			foreach (Chara item3 in nearestPoint.ListCharasInRadius(owner, 6, (Chara _c) => _c != owner && !_c.IsPCFactionOrMinion && _c.id != "cocoon")) 
			foreach (Chara item3 in nearestPoint.ListCharasInRadius(owner, 6, (Chara _c) => _c != owner && !_c.IsPCFactionOrMinion && _c.id != "cocoon" && _c.id != "cocoon_alien")) 
			{
				item3.Teleport(nearestPoint.GetNearestPoint(allowBlock: false, allowChara: false) ?? nearestPoint);
			}

Card โ€‹

public Thing GiveBirth(Thing t, bool effect)

cs

	public void HatchEgg()
	{
		string[] array = new string[6] { "spider_queen", "spider_vampire", "spider_paralyzer", "spider_black", "spider_tarantula", "spider_spotted" }; 
		string[] array = ((!(id == "cocoon")) ? new string[4] { "alien", "alien", "alien", "alien2" } : new string[6] { "spider_queen", "spider_vampire", "spider_paralyzer", "spider_black", "spider_tarantula", "spider_spotted" }); 
		int num = EClass.rnd(array.Length);
		Point point = pos.Copy();
		PlayEffect("blood").SetParticleColor(EClass.Colors.matColors[material.alias].main).Emit(50);

public ref Color GetRandomColor()

cs
	}
	Rand.UseSeed(num, delegate
	{
		_randColor = EClass.sources.materials.rows.RandomItem().matColor; 
		_randColor = EClass.sources.materials.rows[EClass.rnd(90)].matColor; 
	});
	return ref _randColor;
}

Chara โ€‹

public void TickConditions()

cs
			}
		}
	}
	string text = id; 
	if (!(text == "cocoon")) 
	switch (id) 
	{
		if (text == "tsunami") 
	case "cocoon_alien":
	case "cocoon":
		if (!EClass._zone.IsRegion && !IsDisabled && 1.0005f - (float)base.hp / (float)MaxHP > EClass.rndf(1f) && !pos.IsSunLit) 
		{ 
			HatchEgg(); 
			return; 
		} 
		consumeTurn = true; 
		break; 
	case "tsunami": 
		if (elements.Base(79) >= 30) 
		{
			if (elements.Base(79) < 30) 
			{ 
				Die(); 
				return; 
			} 
			if (IsInCombat)
			{
				elements.SetTo(79, elements.Base(79) * 3 / 4);
			}
			break; 
		}
	} 
	else
	{ 
		if (!EClass._zone.IsRegion && !IsDisabled && 1.0001f - (float)base.hp / (float)MaxHP > EClass.rndf(1f) && !pos.IsSunLit) 
		{ 
			HatchEgg(); 
			return; 
		} 
		consumeTurn = true; 
		Die(); 
		return; 
	}
	if (!preventRegen)
	{

public bool CanAcceptItem(Card t, int num = -1, bool skipImportantCheck = false)

cs
	{
		return false;
	}
	if ((t.category.IsChildOf("furniture") || t.category.IsChildOf("junk")) && !HasElement(1411)) 
	if ((t.category.IsChildOf("furniture") || t.category.IsChildOf("junk")) && (!(t.trait is TraitFigure) || !HasElement(1427)) && !HasElement(1411)) 
	{
		return false;
	}

CoreRef โ€‹

using System;

cs
using System;
using System.Collections.Generic;
using System.IO; 
using System.Linq;
using UnityEngine;

public void RefreshBGM()

cs
		int num = 0;
		foreach (BGMData bgm in bgms)
		{
			dictBGM.Add(bgm.id, bgm); 
			dictBGM[bgm.id] = bgm; 
			num++;
		}
		if (Core.Instance.debug.skipMod) 
		{ 
			return; 
		} 
		foreach (KeyValuePair<string, FileInfo> item in MOD.sounds.Where((KeyValuePair<string, FileInfo> kv) => kv.Key.StartsWith("BGM/"))) 
		{ 
			item.Deconstruct(out var key, out var _); 
			ModUtil.AddOrReplaceBGM(key); 
		} 
	}

	public void RebuildBGMList()

ELEMENT โ€‹

public void _WriteNote(UINote n, Chara c, Act act)

cs
			{
				Condition condition = Condition.Create(text2.Replace("@", ""), p);
				condition.owner = c;
				if (condition is ConWeapon conWeapon) 
				{ 
					conWeapon.cha = c.CHA; 
				} 
				if (!source.aliasRef.IsEmpty())
				{
					condition.SetElement(EClass.sources.elements.alias[source.aliasRef].id);

LayerShippingResult โ€‹

public class LayerShippingResult : ELayer

cs
	{
		Add("demitas", 5);
	}
	Add("kettle", 7); 
	int num = list.RandomItem();
	imageBG.sprite = spriteBG[num];
	Rand.SetSeed();

MATERIAL โ€‹

public class MATERIAL : EClass

cs

	public const int MaxTier = 7;

	public static SourceMaterial.Row sourceSnow = EClass.sources.materials.map[48]; 
	public static SourceMaterial.Row sourceSnow => EClass.sources.materials.map[48]; 

	public static SourceMaterial.Row sourceIce = EClass.sources.materials.map[61]; 
	public static SourceMaterial.Row sourceIce => EClass.sources.materials.map[61]; 

	public static SourceMaterial.Row sourceGold = EClass.sources.materials.map[12]; 
	public static SourceMaterial.Row sourceGold => EClass.sources.materials.map[12]; 

	public static SourceMaterial.Row sourceOak = EClass.sources.materials.map[1]; 
	public static SourceMaterial.Row sourceOak => EClass.sources.materials.map[1]; 

	public static SourceMaterial.Row sourceWaterSea = EClass.sources.materials.map[88]; 
	public static SourceMaterial.Row sourceWaterSea => EClass.sources.materials.map[88]; 

	public static SourceMaterial.Row FromElement(int id)
	{

ModManager โ€‹

public override void Init(string path, string defaultPackage = "_Elona")

cs
				ModManagerCore.generateLocalizations = false;
			}
			ImportAllModDialogs();
			BookList.dict = null; 
		});
	}

ModUtil โ€‹

where typeof(SourceData).IsAssignableFrom(f.FieldType)

cs
	public static void OnModsActivated()
	{
		SoundManager.current.soundLoaders.Add(LoadSoundData);
		UIBook.topicLoaders.Add(LoadTopicFiles); 
		BookList.booklistLoaders.Add(LoadBookList); 
		BaseModManager.PublishEvent("elin.mods.activated");
		BaseModManager.SubscribeEvent("elin.game.post_load", PostLoadCleanup); 
	} 
	private static void PostLoadCleanup(object context) 
	{ 
		EClass.player.knownBGMs.RemoveWhere((int id) => !EClass.core.refs.dictBGM.ContainsKey(id)); 
	}

	public static void LoadTypeFallback()

public static void RegisterSerializedTypeFallback(string nameAssembly, string na

cs
		fallbackTypes[nameType] = nameFallbackType;
	}

	public static ModPackage GetModPackage(string modId) 
	{ 
		return ModManagerCore.Instance.MappedPackages.GetValueOrDefault(modId) as ModPackage; 
	} 
	public static void ImportExcel(string pathToExcelFile, string sheetName, SourceData source)
	{
		UnityEngine.Debug.Log("ImportExcel source:" + source?.ToString() + " Path:" + pathToExcelFile);

public static void ImportExcel(string pathToExcelFile, string sheetName, SourceD

cs

	public static ModPackage FindSourceRowPackage(SourceData.BaseRow row)
	{
		return ModManagerCore.Instance.packages.OfType<ModPackage>().FirstOrDefault((ModPackage p) => p.sourceRows.Contains(row)); 
	} 
	public static ModPackage GetModPackage(string modId) 
	{ 
		return ModManagerCore.Instance.MappedPackages.GetValueOrDefault(modId) as ModPackage; 
		return ModManagerCore.Instance.packages.OfType<ModPackage>().LastOrDefault((ModPackage p) => p.sourceRows.Contains(row)); 
	}

	public static SerializableSoundData GetSoundMeta(string soundPath)

public static SerializableSoundData GetSoundMeta(string soundPath)

cs
	if (soundPath.NormalizePath().Contains("/Sound/BGM/"))
	{
		serializableSoundData.type = SoundData.Type.BGM;
		serializableSoundData.bgmDataOptional = new SerializableBGMData(); 
		serializableSoundData.bgmDataOptional = new SerializableBGMData
		{ 
			parts = new List<BGMData.Part> 
			{ 
				new BGMData.Part() 
			} 
		}; 
	}
	IO.SaveFile(path, serializableSoundData);
	return serializableSoundData;

public static SoundData LoadSoundData(FileInfo soundFile)

cs
		SoundManager.current.dictData[fileNameWithoutExtension] = soundData;
		return soundData;
	}
	public static void AddOrReplaceBGM(string bgmId) 
	{ 
		List<BGMData> bgms = Core.Instance.refs.bgms; 
		Dictionary<int, BGMData> dictBGM = Core.Instance.refs.dictBGM; 
		BGMData bGMData = SoundManager.current.GetData(bgmId) as BGMData; 
		if (!(bGMData == null)) 
		{ 
			bGMData.name = bgmId[4..]; 
			if (bGMData.id <= 0) 
			{ 
				bGMData.id = bgms.Count + 1; 
				UnityEngine.Debug.Log($"#sound bgm unassigned/{bGMData.id}/{bGMData.name}"); 
			} 
			if (dictBGM.TryGetValue(bGMData.id, out var value)) 
			{ 
				value.clip = bGMData.clip; 
				UnityEngine.Debug.Log($"#sound bgm replace/{bGMData.id}/{value.name}/>/{bGMData.name}"); 
			} 
			else
			{ 
				bgms.Add(bGMData); 
				dictBGM[bGMData.id] = bGMData; 
				UnityEngine.Debug.Log($"#sound bgm addon/{bGMData.id}/{bGMData.name}"); 
			} 
		} 
	} 
	public static ModPackage FindSoundPackage(string soundId) 
	{ 
		return ModManagerCore.Instance.packages.OfType<ModPackage>().LastOrDefault((ModPackage p) => p.sounds.Keys.Contains(soundId)); 
	} 
	public static Playlist CreatePlaylist(ref List<int> bgmIds, Playlist mold = null) 
	{ 
		Playlist playlist = EClass.Sound.plBlank.Instantiate(); 
		if (bgmIds.Count == 0 && (bool)mold) 
		{ 
			bgmIds = mold.ToInts(); 
			playlist.shuffle = mold.shuffle; 
			playlist.minSwitchTime = mold.minSwitchTime; 
			playlist.nextBGMOnSwitch = mold.nextBGMOnSwitch; 
			playlist.ignoreLoop = mold.ignoreLoop; 
			playlist.keepBGMifSamePlaylist = mold.keepBGMifSamePlaylist; 
			playlist.name = mold.name; 
		} 
		foreach (int bgmId in bgmIds) 
		{ 
			if (EClass.core.refs.dictBGM.TryGetValue(bgmId, out var value)) 
			{ 
				playlist.list.Add(new Playlist.Item
				{ 
					data = value 
				}); 
			} 
		} 
		return playlist; 
	} 
	public static void SetBGMKnown(int bgmId, bool known = true) 
	{ 
		known &= EClass.core.refs.dictBGM.ContainsKey(bgmId); 
		if (known) 
		{ 
			EClass.player.knownBGMs.Add(bgmId); 
		} 
		else
		{ 
			EClass.player.knownBGMs.Remove(bgmId); 
		} 
	} 
	public static string[] LoadBookList() 
	{ 
		return (from d in PackageIterator.GetDirectories("Text").SelectMany((DirectoryInfo d) => d.GetDirectories()) 
			select d.FullName).ToArray(); 
	} 
	public static string[] LoadTopicFiles() 
	{ 
		return PackageIterator.GetFiles("Text/Help/_topics.txt").SelectMany((FileInfo f) => IO.LoadTextArray(f.FullName)).ToArray(); 
	} 
}

SKILL โ€‹

public override bool CanLink(ElementContainer owner)

cs
{
	if (!base.IsGlobalElement)
	{
		return !base.source.IsWeaponEnc; 
		if (base.source.IsWeaponEnc) 
		{ 
			if (base.owner != null && base.owner.Card != null) 
			{ 
				return !base.owner.Card.IsWeapon; 
			} 
			return false; 
		} 
		return true; 
	}
	return false;
}

Thing โ€‹

public override void WriteNote(UINote n, Action<UINote> onWriteNote = null, IIns

cs
			}
			if (!e.IsGlobalElement)
			{
				if (e.source.tag.Contains("weaponEnc") && !base.IsWeapon && !base.IsRangedWeapon && !base.IsAmmo && !base.IsThrownWeapon && !(trait is TraitToolMusic)) 
				if (e.source.tag.Contains("weaponEnc") && !base.IsEquipmentOrRangedOrAmmo && !base.IsThrownWeapon && !(trait is TraitToolMusic)) 
				{
					return false;
				}
				if (e.source.IsWeaponEnc && !base.category.IsChildOf("shield") && !base.IsWeapon && !base.IsRangedWeapon && !base.IsAmmo && !base.IsThrownWeapon && !(trait is TraitToolMusic)) 
				if (e.source.IsWeaponEnc && !base.category.IsChildOf("shield") && !base.IsEquipmentOrRangedOrAmmo && !base.IsThrownWeapon && !(trait is TraitToolMusic)) 
				{
					return false;
				}

Trait โ€‹

public virtual void OnBarter(bool reroll = false)

cs
	owner.c_dateStockExpire = EClass.world.date.GetRaw(24 * RestockDay);
	owner.isRestocking = true;
	t.things.DestroyAll((Thing _t) => _t.GetInt(101) != 0);
	foreach (Thing thing9 in t.things) 
	foreach (Thing thing10 in t.things) 
	{
		thing9.invX = -1; 
		thing10.invX = -1; 
	}
	switch (ShopType)
	{

public virtual void OnBarter(bool reroll = false)

cs
			break;
		}
		int num5 = 0;
		foreach (Thing thing10 in c_copyContainer.things) 
		foreach (Thing thing11 in c_copyContainer.things) 
		{
			if (!owner.trait.CanCopy(thing10)) 
			if (!owner.trait.CanCopy(thing11)) 
			{
				continue;
			}
			Thing thing2 = thing10.Duplicate(1); 
			Thing thing2 = thing11.Duplicate(1); 
			thing2.isStolen = false;
			thing2.isCopy = true;
			thing2.c_priceFix = 0;

public virtual void OnBarter(bool reroll = false)

cs
				break;
			}
			case CopyShopType.Spellbook:
				thing2.c_charges = thing10.c_charges; 
				thing2.c_charges = thing11.c_charges; 
				break;
			}
			if (num6 > 1 && thing2.trait.CanStack)

public virtual void OnBarter(bool reroll = false)

cs
				break;
			}
			case ShopType.Medal:
				NoRestockId("hammer_garokk", 3); 
				NoRestockId("sword_dragon", 1); 
				NoRestockId("hammer_garokk", 3, 0); 
				NoRestockId("sword_dragon", 1, 0); 
				Add("sword_dragon", 1, 0).SetReplica(on: true);
				NoRestockId("point_stick", 1); 
				NoRestockId("point_stick", 1, 0); 
				Add("point_stick", 1, 0).SetReplica(on: true);
				NoRestockId("blunt_bonehammer", 1); 
				NoRestockId("blunt_bonehammer", 1, 0); 
				Add("blunt_bonehammer", 1, 0).SetReplica(on: true);
				NoRestockId("pole_gunlance", 1); 
				NoRestockId("pole_gunlance", 1, 0); 
				Add("pole_gunlance", 1, 0).SetReplica(on: true);
				NoRestockId("sword_muramasa", 1); 
				NoRestockId("sword_muramasa", 1, 0); 
				Add("sword_muramasa", 1, 0).SetReplica(on: true);
				NoRestockId("sword_forgetmenot", 1); 
				NoRestockId("sword_forgetmenot", 1, 0); 
				Add("sword_forgetmenot", 1, 0).SetReplica(on: true);
				NoRestockId("dagger_fish", 1); 
				NoRestockId("dagger_fish", 1, 0); 
				Add("dagger_fish", 1, 0).SetReplica(on: true);
				NoRestockId("sword_zephir", 1); 
				NoRestockId("sword_zephir", 1, 0); 
				Add("sword_zephir", 1, 0).SetReplica(on: true);
				Add("ribbon", 1, 0);
				Add("helm_sage", 1, 0);
				Add("wear_swim_danger", 1, 0); 
				Add("wear_swim_danger", 1, 1); 
				Add("diary_sister", 1, 0);
				Add("diary_catsister", 1, 0);
				Add("diary_lady", 1, 0);

public virtual void OnBarter(bool reroll = false)

cs
				}
				AddThing(ThingGen.CreateScroll(8780, EClass.rndHalf(5)));
			}
			foreach (Thing thing11 in t.things) 
			foreach (Thing thing12 in t.things) 
			{
				thing11.c_idBacker = 0; 
				thing12.c_idBacker = 0; 
				if (ShopType != ShopType.Copy)
				{
					thing11.TryMakeRandomItem(ShopLv); 
					if (thing11.Num == 1) 
					thing12.TryMakeRandomItem(ShopLv); 
					if (thing12.Num == 1) 
					{
						thing11.SetNum(thing11.trait.DefaultStock); 
						thing12.SetNum(thing12.trait.DefaultStock); 
					}
					if (thing11.trait is TraitFoodMeal) 
					if (thing12.trait is TraitFoodMeal) 
					{
						CraftUtil.MakeDish(thing11, ShopLv, owner.Chara); 
						CraftUtil.MakeDish(thing12, ShopLv, owner.Chara); 
					}
					if (thing11.IsFood && owner.id == "rodwyn") 
					if (thing12.IsFood && owner.id == "rodwyn") 
					{
						SourceElement.Row row = EClass.sources.elements.rows.Where((SourceElement.Row e) => !e.foodEffect.IsEmpty() && e.category != "feat" && e.chance > 0).RandomItem();
						thing11.elements.SetBase(row.id, 10 + EClass.rnd(10)); 
						thing12.elements.SetBase(row.id, 10 + EClass.rnd(10)); 
					}
				}
				if (CurrencyType == CurrencyType.Casino_coin)
				{
					thing11.noSell = true; 
					thing12.noSell = true; 
				}
				if (Guild.Thief.IsCurrentZone)
				{
					thing11.isStolen = true; 
					thing12.isStolen = true; 
				}
				if (!(thing11.trait is TraitErohon)) 
				if (!(thing12.trait is TraitErohon)) 
				{
					thing11.c_IDTState = 0; 
					thing12.c_IDTState = 0; 
				}
				if (CurrencyType == CurrencyType.Money && (thing11.category.IsChildOf("meal") || thing11.category.IsChildOf("preserved")) && thing11.id != "ration" && !thing11.IsUnique) 
				if (CurrencyType == CurrencyType.Money && (thing12.category.IsChildOf("meal") || thing12.category.IsChildOf("preserved")) && thing12.id != "ration" && !thing12.IsUnique) 
				{
					thing11.c_priceFix = -70; 
					thing12.c_priceFix = -70; 
				}
				if (ShopType == ShopType.TravelMerchant)
				{
					thing11.c_priceFix = 200; 
					thing12.c_priceFix = 200; 
				}
				if (thing11.trait is TraitErohon) 
				if (thing12.trait is TraitErohon) 
				{
					thing11.c_IDTState = 5; 
					thing12.c_IDTState = 5; 
				}
				if (thing11.IsContainer && !thing11.c_revealLock) 
				if (thing12.IsContainer && !thing12.c_revealLock) 
				{
					thing11.RemoveThings(); 
					thing12.RemoveThings(); 
					t.c_lockLv = 0;
				}
			}

public virtual void OnBarter(bool reroll = false)

cs
			Thing Add(string id, int a, int idSkin)
			{
				CardBlueprint.SetNormalRarity();
				Thing thing8 = ThingGen.Create(id, -1, ShopLv).SetNum(a); 
				thing8.idSkin = ((idSkin == -1) ? EClass.rnd(thing8.source.skins.Length + 1) : idSkin); 
				return t.AddThing(thing8); 
				Thing thing9 = ThingGen.Create(id, -1, ShopLv).SetNum(a); 
				thing9.idSkin = ((idSkin == -1) ? EClass.rnd(thing9.source.skins.Length + 1) : idSkin); 
				return t.AddThing(thing9); 
			}
			void AddAdvWeek(int i)
			{

Thing AddThing(Thing _t)

cs
			}
			void NoRestock(Thing _t)
			{
				HashSet<string> hashSet = EClass.player.noRestocks.TryGetValue(owner.id); 
				string text = owner.id; 
				if (_t.idSkin != 0) 
				{ 
					text = text + "_skin" + _t.idSkin; 
				} 
				HashSet<string> hashSet = EClass.player.noRestocks.TryGetValue(text); 
				if (hashSet == null)
				{
					hashSet = new HashSet<string>();

void NoRestock(Thing _t)

cs
					if (!hashSet.Contains(_t.trait.IdNoRestock))
					{
						hashSet.Add(_t.trait.IdNoRestock);
						EClass.player.noRestocks[owner.id] = hashSet; 
						EClass.player.noRestocks[text] = hashSet; 
						_t.SetInt(101, 1);
						AddThing(_t);
					}
				}
				void NoRestockId(string _id, int num) 
				void NoRestockId(string _id, int num, int idSkin) 
				{
					NoRestock(ThingGen.Create(_id).SetNum(num)); 
					Thing thing8 = ThingGen.Create(_id).SetNum(num); 
					thing8.idSkin = idSkin; 
					NoRestock(thing8); 
				}
			}

Zone โ€‹

public void RefreshBGM()

cs

	public Playlist CreatePlaylist(ref List<int> list, Playlist mold = null)
	{
		Playlist playlist = EClass.Sound.plBlank.Instantiate(); 
		if (list.Count == 0 && (bool)mold) 
		{ 
			list = mold.ToInts(); 
			playlist.shuffle = mold.shuffle; 
			playlist.minSwitchTime = mold.minSwitchTime; 
			playlist.nextBGMOnSwitch = mold.nextBGMOnSwitch; 
			playlist.ignoreLoop = mold.ignoreLoop; 
			playlist.keepBGMifSamePlaylist = mold.keepBGMifSamePlaylist; 
			playlist.name = mold.name; 
		} 
		foreach (int item in list) 
		{ 
			playlist.list.Add(new Playlist.Item
			{ 
				data = EClass.core.refs.dictBGM.TryGetValue(item, 1) 
			}); 
		} 
		return playlist; 
		return ModUtil.CreatePlaylist(ref list, mold); 
	}

	public Chara FindChara(string id)