G
GreatName
Guest
Guest
So you have indeed to edit method then put the code at line 29 (if you edited method otherwise you're editing the class and line number is 20XX) in between the other "if (..){}" code statements. And that should do it for positioning testing.O.K. I'm learning a lot. Now I have added the code, compiles it. and .. so far no problem. But thats the the first part for checking characters position. The second part of your code is:
//G.cs:get:29
if (varname.Contains(".pos"))
{
return G.checkPos(varname.Split(new char[]
{
'.'
})[0]);
}
has to go to here ?: View attachment 36160 what hav I to do to implement these part ? Same way with Edit class ? and where have I to insert it
View attachment 36160
Sorry forget last post I've got it.
First I like to test it with character positions code. If that runs, then I'll try the next steps. So, is ist necessary for that to implement also the last part at the end of your mod read.me)
// Add change plan at the end of OperateNew day
G.changePlanNpc(G.mom, G.getDia("change.mom.plan.dia")); and so on ? And where have I to place it ?
Hi,
I) think there are two parts which are missing tha changeplan will run:
1. the definition private static void changePlanNpc(Npc,npc,Dia dia) which is not in games dll, as you can see here:
your dll:
game.dll: View attachment 36870
View attachment 36871
So, how do I get this definition to game. dll ? and...
2. Add change at the end of OperateNewDay
PlanNPC(G.mom, G.getDia["change.mo..plan.dia")); etc
I think I can manage this, but doing this first I get the errior message that the definition didn't exist. So how can I transfer it from your dll to game dll, or what have i to do, to create this ?
To get change plans to work edit the class G. then go at the end of code blocks of operateNewDay(..){} (which is very long ...) just before the closing braces "}", there put this code.Hi, I've managed it, but it still didn't work in game. In your assembly.dll you have following entry in private static changePlanNPC(Npc,npc Dia dia):
string[] array = answer.text[0].Split(new char[] but in your read me, there is following line:
string[] planData = answer.text[0].Split(new char[]
So, with the first dnSpy is accepting, with the second one I'v got errors. But also with the first on it didn't run in game.
Code:
G.changePlanNpc(G.mom, G.getDia("change.mom.plan.dia"));
G.changePlanNpc(G.liza, G.getDia("change.lisa.plan.dia"));
G.changePlanNpc(G.alisa, G.getDia("change.alice.plan.dia"));
G.changePlanNpc(G.kira, G.getDia("change.kira.plan.dia"));
G.changePlanNpc(G.olivia, G.getDia("change.olivia.plan.dia"));
Code:
private static void changePlanNpc(Npc npc, Dia dia)
{
if (dia == null)
{
return;
}
for (int i = 0; i < dia.answers; i++)
{
Answer answer = dia.answer[i];
if (answer.conditionOk())
{
string[] planData = answer.text[0].Split(new char[]
{
' '
});
npc.changePlan(G.day, Convert.ToInt32(planData[0]), new Plan(planData[1], Convert.ToInt32(planData[2]), planData[3], true, answer.link), 1);
}
}
}