I'm pretty sure we fixed that recently. Are you on 0.10.1.4? If so, we'll probably have to revisit our fix.
Next release I assumepublic override void onConsumeAmmo(Player player)
i cant use this,even example mod cant be made up because this,so when can i use it?
thx very muchNext release I assume
That 'was built for this version' text should be precautinary text that isn't related to the actual error - post whats noted as the 'actual error' text (or a screenshot of the whole thing) here and we could probably tell you whats wrong.were made for 0.10.1.3 when I am running 0.10.1.4
Ah, pardon me. It was late when I wrote that. The message itself is in error, I feel, as nothing in my mod setup, or tModLoader setup, changed at all, yet it suddenly determined these mods (of which the same versions worked fine on 0.10.1.4 for multiple weeks) are incompatible, despite working fine when I was using them earlier that same day, and many days beforehand.That 'was built for this version' text should be precautinary text that isn't related to the actual error - post whats noted as the 'actual error' text (or a screenshot of the whole thing) here and we could probably tell you whats wrong.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace MoreAwesomeStuffpeeps.NPCs.Boss
{
[AutoloadBossHead]
public class TheSeer : ModNPC
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("The Seer");
Main.npcFrameCount[npc.type] = 6;
}
public override void SetDefaults()
{
npc.aiStyle = 4; //Eye of Cthulhu AI
npc.lifeMax = 200000;
npc.damage = 80;
npc.defense = 30;
npc.knockBackResist = 0f;
npc.width = 100;
npc.height = 110;
npc.value = 10000;
npc.npcSlots = 1f;
npc.boss = true;
npc.lavaImmune = true;
npc. noGravity = true;
npc.noTileCollide = true;
npc.HitSound = SoundID.NPCHit1;
npc.DeathSound = SoundID.NPCDeath1;
music = MusicID.Boss1;
bossBag = mod.ItemType("TheSeerTreasureBag");
}
public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
{
npc.lifeMax = (int)(npc.lifeMax * 0.500f * bossLifeScale);
npc.damage = (int)(npc.damage * 0.5f);
npc.defense = (int)(npc.defense + numPlayers);
}
public override void FindFrame(int frameHeight)
{
npc.frameCounter += 1.0;
npc.frameCounter %= 10;
int frame = (int)(npc.frameCounter / 2.0);
if (frame >= Main.npcFrameCount[npc.type]) frame = 0;
npc.frame.Y = frame * frameHeight;
}
public override void NPCLoot()
{
if (Main.expertMode)
{
npc.DropBossBags();
}
else
{
if (Main.rand.Next(3) == 0)
{
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("LuminiteSlimeSword"));
}
else
{
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("CelestialPickaxe"));
}
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("CelestialBar"), 5);
}
}
}
}
I have not tried that. I'll try. But I do not know how to use a JSON file. I have only used C# files.What about allow to localize mod in JSON file?
JSON allows you to easily group your keys.I have not tried that. I'll try. But I do not know how to use a JSON file. I have only used C# files.
{
"ItemName" : {
"PhantomSword" : "Phantom sword",
"PhantomStaff" : "Phantom staff"
},
"ItemToolTip" : {
"PhantomSword" : "This is a phantom sword",
"PhantomStaff" : "This is a phantom staff"
}
}
ItemName.PhantomSword=Phantom sword
ItemName.PhantomStaff=Phantom staff
ItemToolTip.PhantomSword=This is a phantom sword
ItemToolTip.PhantomStaff=This is a phantom staff
I do not understand. Can you explain to me, why do you think LANG is more convenient for "non computer savvy translators"?We decided against json for mods because the syntax is too easily broken. We wanted it to be as easy as possible for non computer savvy translators to contribute translations.
...and I still have a few bunches of merged text.If the grouping bothers you just put a blank line between groups.
You can comment json anyway, so that's not it.I do not understand. Can you explain to me, why do you think LANG is more convenient for "non computer savvy translators"?
...and I still have a few bunches of merged text.
Is it so important to comment your en-US.lang that you are ready to sacrifice convenience? Well then, at least, add the ability to use JSON to those who need it.
Vanila works fine with JSON.Getting the quotes, colon, commas, and curly braces syntactically correct is always a pain.
Let me give you an example. We are creating mod about magic. Each spell have it's own name and description. We describe them not as SpellName.ExampleSpell and SpellDescription.ExampleSpell, but as ExampleSpell.SpellName and ExampleSpell.SpellDescription (field is inside class, as it should be). In this case you don't need to separate data about one item into different parts of document.Another thing is the grouping of keys might be counter-intuitive for most situations. For example, why would you want to force ItemName entries to be separate from ItemToolTip entries? That would just mean that all the info common to an item has to be spread apart really far. With the simpler setup, the modder can decide how they want to group things. Believe me, we discussed the JSON structure for weeks worrying about which structure works best before we decided that it was a bad idea either way.