Sorrowthief
New member
So after many questions and no fix for this I believe I will have to edit the Assembly-c#.dll files. I want to add my own Journal entries and also be able to use as many of the <action type="ShowTip" value="tutorialTipQuest02" /> tips as I want.
I found this code after I downloaded the SDXmodding master and using DLspy. Can anyone teach me how to edit this script to do what I want to do and also explain to me how to actually edit the script that I see in Dlspy. I have not been able to edit anything in there and when I create a new class and copy and paste the code from the original and hit compile it has an error. Do I need another program to actually edit the scripts or can that be done in dlspy? I have been searching the forums for answers but a lot of the information is old and I don't know if it is all still relevant. Here is the code I found. Thanks for any help on this I refuse to let this <"tutorialTipQuest02" /> error prevent me from making my mod and have to sit out for a few more alphas like I have in the past.
I found this code after I downloaded the SDXmodding master and using DLspy. Can anyone teach me how to edit this script to do what I want to do and also explain to me how to actually edit the script that I see in Dlspy. I have not been able to edit anything in there and when I create a new class and copy and paste the code from the original and hit compile it has an error. Do I need another program to actually edit the scripts or can that be done in dlspy? I have been searching the forums for answers but a lot of the information is old and I don't know if it is all still relevant. Here is the code I found. Thanks for any help on this I refuse to let this <"tutorialTipQuest02" /> error prevent me from making my mod and have to sit out for a few more alphas like I have in the past.
Code:
using System;
using System.Collections.Generic;
using System.IO;
// Token: 0x020007AE RID: 1966
public class PlayerJournal
{
// Token: 0x060035D1 RID: 13777 RVA: 0x0019B4BC File Offset: 0x001998BC
public void Read(BinaryReader _br)
{
this.List.Clear();
byte b = _br.ReadByte();
int num = (int)_br.ReadInt16();
for (int i = 0; i < num; i++)
{
JournalEntry.JournalEntryTypes entryType = (JournalEntry.JournalEntryTypes)_br.ReadByte();
JournalEntry journalEntry = JournalEntry.CreateNewEntry(entryType);
journalEntry.Read(_br);
this.List.Add(journalEntry);
}
}
// Token: 0x060035D2 RID: 13778 RVA: 0x0019B518 File Offset: 0x00199918
public void Write(BinaryWriter _bw)
{
_bw.Write(1);
int count = this.List.Count;
_bw.Write((ushort)count);
for (int i = 0; i < count; i++)
{
this.List[i].Write(_bw);
}
}
// Token: 0x060035D3 RID: 13779 RVA: 0x0019B564 File Offset: 0x00199964
public PlayerJournal Clone()
{
PlayerJournal playerJournal = new PlayerJournal();
for (int i = 0; i < this.List.Count; i++)
{
playerJournal.List.Add(this.List[i].Clone());
}
return playerJournal;
}
// Token: 0x060035D4 RID: 13780 RVA: 0x0019B5B0 File Offset: 0x001999B0
public bool HasEntry(JournalEntry.JournalEntryTypes entryType, string ID)
{
for (int i = 0; i < this.List.Count; i++)
{
if (this.List[i].EntryType == entryType && this.List[i].ID == ID)
{
return true;
}
}
return false;
}
// Token: 0x060035D5 RID: 13781 RVA: 0x0019B610 File Offset: 0x00199A10
public void AddEntry(JournalEntry.JournalEntryTypes entryType, string ID)
{
if (!this.HasEntry(entryType, ID))
{
JournalEntry journalEntry = JournalEntry.CreateNewEntry(entryType);
journalEntry.ID = ID;
journalEntry.TimeStamp = GameManager.Instance.World.worldTime;
this.List.Add(journalEntry);
}
}
// Token: 0x060035D6 RID: 13782 RVA: 0x0019B65C File Offset: 0x00199A5C
public void AddJournalEntry(string tip, ToolTipEvent closeEvent = null, bool showOnce = true, bool showWindow = false)
{
if (showOnce && this.HasEntry(JournalEntry.JournalEntryTypes.Tip, tip))
{
return;
}
string arg = Localization.Get(string.Format("{0}_title", tip), Localization.QuestPrefix);
if (showWindow && GamePrefs.GetBool(EnumGamePrefs.OptionsJournalPopup))
{
XUiC_TipWindow.ShowTip(tip, XUiM_Player.GetPlayer() as EntityPlayerLocal, closeEvent);
this.AddEntry(JournalEntry.JournalEntryTypes.Tip, tip);
}
else
{
if (closeEvent != null)
{
closeEvent.HandleEvent();
closeEvent = null;
}
ToolTipEvent toolTipEvent = new ToolTipEvent();
toolTipEvent.EventHandler += this.AddTipHandler;
toolTipEvent.Parameter = tip;
GameManager.ShowTooltipWithEvent(XUiM_Player.GetPlayer() as EntityPlayerLocal, string.Format("{0}: {1}", Localization.Get("ttNewJournalEntry", string.Empty), arg), string.Empty, toolTipEvent);
}
}
// Token: 0x060035D7 RID: 13783 RVA: 0x0019B724 File Offset: 0x00199B24
private void AddTipHandler(object obj)
{
LocalPlayerUI.GetUIForPrimaryPlayer().xui.CollectedItemList.AddIconNotification("ui_game_symbol_pen", 1, false);
this.AddEntry(JournalEntry.JournalEntryTypes.Tip, (string)obj);
}
// Token: 0x060035D8 RID: 13784 RVA: 0x0019B750 File Offset: 0x00199B50
public bool HasUnreadTips()
{
for (int i = 0; i < this.List.Count; i++)
{
if (!this.List[i].IsRead)
{
return true;
}
}
return false;
}
// Token: 0x04002A41 RID: 10817
private const int cCurrentSaveVersion = 1;
// Token: 0x04002A42 RID: 10818
public List<JournalEntry> List = new List<JournalEntry>();
// Token: 0x020007AF RID: 1967
public enum JournalTipEntry
{
// Token: 0x04002A44 RID: 10820
bedrollTip,
// Token: 0x04002A45 RID: 10821
harvestTip,
// Token: 0x04002A46 RID: 10822
waterTip,
// Token: 0x04002A47 RID: 10823
airDropTip,
// Token: 0x04002A48 RID: 10824
cementMixerTip,
// Token: 0x04002A49 RID: 10825
workbenchTip,
// Token: 0x04002A4A RID: 10826
campfireTip,
// Token: 0x04002A4B RID: 10827
forgeTip,
// Token: 0x04002A4C RID: 10828
chemistryStationTip,
// Token: 0x04002A4D RID: 10829
tutorialTipQuest01,
// Token: 0x04002A4E RID: 10830
tutorialTipQuest02,
// Token: 0x04002A4F RID: 10831
skillPointTip,
// Token: 0x04002A50 RID: 10832
farmingTip,
// Token: 0x04002A51 RID: 10833
firstAidTip,
// Token: 0x04002A52 RID: 10834
augmentGunsTip,
// Token: 0x04002A53 RID: 10835
gunAssemblyTip,
// Token: 0x04002A54 RID: 10836
alternateAmmoTip,
// Token: 0x04002A55 RID: 10837
hotWeatherTip,
// Token: 0x04002A56 RID: 10838
coldWeatherTip,
// Token: 0x04002A57 RID: 10839
traderTip,
// Token: 0x04002A58 RID: 10840
treasureMapTip,
// Token: 0x04002A59 RID: 10841
vendingMachineTip,
// Token: 0x04002A5A RID: 10842
miningTip,
// Token: 0x04002A5B RID: 10843
meleeToolWireToolTip,
// Token: 0x04002A5C RID: 10844
generatorBankTip,
// Token: 0x04002A5D RID: 10845
solarBankTip,
// Token: 0x04002A5E RID: 10846
batteryBankTip,
// Token: 0x04002A5F RID: 10847
paintingTip,
// Token: 0x04002A60 RID: 10848
cameraTip,
// Token: 0x04002A61 RID: 10849
triggerDelayDurationTip,
// Token: 0x04002A62 RID: 10850
landClaimTip,
// Token: 0x04002A63 RID: 10851
passthroughTriggeringTip,
// Token: 0x04002A64 RID: 10852
quest_WhiteRiverCitizen1_description,
// Token: 0x04002A65 RID: 10853
onFireTip,
// Token: 0x04002A66 RID: 10854
tableSawTip,
// Token: 0x04002A67 RID: 10855
questTip,
// Token: 0x04002A68 RID: 10856
powerAttackTip,
// Token: 0x04002A69 RID: 10857
survivalTip
}
}