Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Field Researcher
Original Poster
#1 Old 20th Nov 2014 at 5:33 PM
Default Many script modding questions
Really, i am a bit stuck of some things in my modding. I tried the same method used in the interactions, but it doen´t help me.

I want to run another method when a sim reach the level 3 in my custom skill. I am using a listener. I was thinking in something like that for the code, but i can´t create something that can work, so please, help me:

Code:
private static ListenerAction LoadSkillLevel  //As I said before, that method is referenced by a Listener, concretely the listener kSkillLevelUp
{
//The code that parse the levels and others variables
}
//My referenced method to run the action
}
}


I also have another question. I was Reading that thread:http://www.modthesims.info/showthre...t=vampire+drink , and I am really interested in replace the same interaction but with different method. So, I decided to start making everything explained in post 12, so I decided to follow that instructios (partially). I took the existing Drink interaction and i put in the line selected:

Code:
 <Action>
 <Key>Vampire Drink To Kill</Key>
 <Name>VampireDrinkToKill</Name>
 <ActorAge>TYAE</ActorAge>
 <TargetAge>TYAE</TargetAge>
 <DataVersion>EP3</DataVersion>
 <CodeVersion>EP3</CodeVersion>
 <Com>Amorous</Com>
 <ProceduralTest>TestVampireDrink</ProceduralTest>  //HERE I CHANGE TO TESTVAMPIREDRINK TO TESTVAMPIREDRINKVT TO DIFERENCE IT FROM ORIGINAL
 <PassiveText>VampireDrinkPassive</PassiveText>
 <JazzGraph>social_generic</JazzGraph>
 <AnimationSuite>takeBlood</AnimationSuite>
 <NeedsSocialJig>1</NeedsSocialJig>
 <SocialJig>SocialJigTwoPerson</SocialJig>
 <IsADominantSTCSocial>1</IsADominantSTCSocial>
 <AppearsOnTopLevel>1</AppearsOnTopLevel>
 <IsAllowedWhileHoldingDrinks>0</IsAllowedWhileHoldingDrinks>
 </Action>


(I took the code from the thread mentioned)

I make my own class with the same name that the original. I put it into the original namespace (same class, same namespace but different method name) but it doesnt.work, so i decided to change the namespace and write the Namespace.Class.Method in the line, but it didn´t work. So, i decide to ask here with the skill question. I discart dll loading issues, because it had some other codes that work in the game.

So, can you help me?

Thanks in advance! You are the best!
Advertisement
Inventor
#2 Old 21st Nov 2014 at 10:34 AM
I don't understand your first question. What is the problem?

I have no experience with social interactions defined through XML,
nor plans to learn how they work, so I can't really help you.
I've read very quickly the thread you linked, I'm not sure if there they also replaced
the code of the interaction, but if that were the case why don't you do the same thing,
following exactly the same steps, see if it works and then make your own changes?
Field Researcher
Original Poster
#3 Old 22nd Nov 2014 at 10:09 PM
Quote: Originally posted by Arsil
I don't understand your first question. What is the problem?

I have no experience with social interactions defined through XML,
nor plans to learn how they work, so I can't really help you.
I've read very quickly the thread you linked, I'm not sure if there they also replaced
the code of the interaction, but if that were the case why don't you do the same thing,
following exactly the same steps, see if it works and then make your own changes?


First of all, sorry for the late reply. Now, I explain better:

1. Basically, I want to create a method referenced by a listener (ListenerAction), concretely I want to use the listener kSkillLevelUp. Obviously, when the listener triggers, that method is referenced. Now I want to reference another method when a definite skill level was reached in a custom skill. I try some things, but nothing working. Basically I want to run a method when a custom skill reach a level.

2. That is my question. I don't see in the tutorial when is introduced the new definition. I have the same question as you.
Inventor
#4 Old 23rd Nov 2014 at 7:54 AM Last edited by Arsil : 23rd Nov 2014 at 8:40 AM.
I see. I don't know how listeners work so I can't help you with that,
but if I remember correctly is the way some NRaas mods use to
execute custom code/methods instead of the standard ones, so
it seems to me like a good solution for your problem.

As an alternative, can't you hide or replace the EA interaction and
use your own using the injection method? Damn, now that simlogical
has shut down its forum the following posts in the injection tutorial
thread were cut, they had a lot of useful info.
Field Researcher
Original Poster
#5 Old 23rd Nov 2014 at 9:25 AM
Quote: Originally posted by Arsil
I see. I don't know how listeners work so I can't help you with that,
but if I remember correctly is the way some NRaas mods use to
execute custom code/methods instead of the standard ones, so
it seems to me like a good solution for your problem.

As an alternative, can't you hide or replace the EA interaction and
use your own using the injection method? Damn, now that simlogical
has shut down its forum the following posts in the injection tutorial
thread were cut, they had a lot of useful info.


No, i cant hide it because it is a XML interaction with a Social Test. I can hide it removing the XMXML entry and make the code to scripting, but I don't know if it will work well. I will test.

Thanks!

I will also check brass code for the skill code, but I think I won't get anything. I will also post here with my own results.
Inventor
#6 Old 24th Nov 2014 at 6:38 AM
Quote: Originally posted by Arsil
Damn, now that simlogical has shut down its forum the following posts
in the injection tutorial thread were cut, they had a lot of useful info.


That has been fixed very quickly (at the top of the page there's a link to a PDF with all info).
Back to top