-
Posts
2 -
Joined
-
Last visited
Nexus Mods Profile
About Dekita
Profile Fields
-
Website URL
http://www.dekitarpg.com
-
Discord ID
Dekita#3098
-
Country
United Kingdom
Dekita's Achievements
Newbie (1/14)
1
Reputation
-
User Profile and Direct Messaging Improvements Beta
Dekita replied to JustThatKing's topic in Site Updates
new profile page is *chefs kiss* -
Hi, I have recently begun looking into writing my own script mods for the witcher by studying other mods and the default code. This is my very first game mod; however, I have written a number of scripts/programs for other things in various languages - mostly web based (php/js/mysql etc) but I have had some experience with C++. Thus far, I have managed to create a fairly simple script that alters the levels of all relic/witcher equipment (not crossbows). I am quite happy with how this works, and have set upon writing another mod - perhaps a little more complex this time... Anyway, I have a few noobish questions that I would really appreciate some help with. Mostly relating to the script syntax. 1:- The following function. I am fairly certain I am right, but wanted to double check... the ': int' after the () in the function name definition... this is telling the engine what data type to expect when the function is returned, yes? public function GetMoney() : int { return GetItemQuantityByName( 'Crowns' ); } This would be similar to the following? function int GetMoney(){ // :.. } 2:- Within most scripts ive seen, there are functions that look like this:.. import final function GetItemAbilityAttributeValue( itemId : SItemUniqueId, attributeName : name, abilityName : name) : SAbilityAttributeValue; import final function GetItemFromSlot( slotName : name ) : SItemUniqueId; What the hell? Where are these functions being 'imported' from? what does 'final' mean? And if the function is being imported, why do we still need to tell the engine what data type to expect when the function returns? 3:- I dont really have a third question, but I would like to know if there is any other helpful advice you would like to share that might help. Like, something you know now you wish you knew when you started :D Any and all help will be greatly appreciated. <3