Results 1 to 22 of 22

Dialogue mod perhaps ?

  1. #1
    Member Ness's Avatar
    Join Date
    Mar 2012
    Location
    In my ass

    Dialogue mod perhaps ?

    Hello, I'm new here. As you can see from the title, I was trying to get the ''Dialogue mod''. But I cant find a thing
    You would probably ask: What's that? I 've played both DC and SS campaign, and I am a big fan of Warhammer 40k games. I simply enjoy playing campaign, especially attacking AI's stronghold provinces. I was wondering if you guys can make a mod which includes some dialogue or quotes from campaign missions, but this time in skirmish. Huh.. well something like that. So, while playing skirmish I'd like to see some dialogue/conversation on the top of the screen between my commander and AI, just like in campaign. If you could do that for me, I would be very greatful.
    Or, If you guys know such thing, give me a link.



    ~Sincerely, Ness.

  2. #2
    It's doable, but technically this thread isn't. Which is okay, sometimes it happens, eh?

  3. #3
    Member Ness's Avatar
    Join Date
    Mar 2012
    Location
    In my ass
    What's the point ?

  4. #4
    Member
    Join Date
    Mar 2010
    Location
    West Midlands, UK
    Basically I think Chiu ChunLing means this, taken from the forum guidelines:

    #1: No Mod Requests

    Asking people to do your mod for you is a no-no, and as such all threads asking for people to do your ideas will be locked. This also goes for "Here's an idea!" threads.
    If you're interested in campaign mods though, I'd recommend taking a look at the Darkness Within project in the "mods in progress" section. It's still WIP, but looks like it is going to be awesome when it's finished.

    Welcome to the forums.

  5. #5
    Greymane pack-father Lleman's Avatar
    Join Date
    Dec 2005
    Location
    On my way back to my cubs, eternally.

    The point is probably right here.

    However, there's loads of infos, tuts and how-tos were you to feel an adventurous and inquisitive mind. Or just google for it if you aren't.

    Ninja'd... ah well... slow to load post is slow
    We look to the heavens so that one day our children may look back towards home.

  6. #6
    A slightly more specific pointer, the dialog you want to do is mostly controlled through map scar calls of map nis. A simple example from the DC chaos mission.scar would be:

    Code:
    function Rule_Bastion_Discussion()
    
     local humanplayer = MetaMap_GetPlayerRaceName()	
     
    	if humanplayer == "chaos_marine_race" then
    	
    		--[[no text since this is the chaos stronghold]]
    		
    	elseif humanplayer == "eldar_race" then
    	
    		Util_StartIntel(EVENTS.IE_Eldar_Bastion)
    	
    	elseif humanplayer == "guard_race" then
    	
    		Util_StartIntel(EVENTS.IE_IG_Bastion)
    	
    	elseif humanplayer == "ork_race" then
    	
    		Util_StartIntel(EVENTS.IE_Ork_Bastion)	
    	
    	elseif humanplayer =="space_marine_race" then
    	
    		Util_StartIntel(EVENTS.IE_SM_Bastion)
    	
    	elseif humanplayer == "tau_race" then
    	
    		Util_StartIntel(EVENTS.IE_Tau_Bastion)
    	
    	elseif humanplayer == "necron_race" then
     
    		Util_StartIntel(EVENTS.IE_Necron_Bastion)
    		
    	end
    
    end
    This function, when called, conditionally activates a race specific event defined in the mission.nis file. The eldar event () looks like this.

    Code:
    EVENTS.IE_Eldar_Bastion = function()
    
    	Util_SetIE( true )
    
    	CTRL.Actor_PlaySpeech(  ACT.Eliphas, 2531120 )	--Yes, come into my home, Taldeer.
    	CTRL.WAIT()
    	
    	CTRL.Actor_PlaySpeech(  ACT.Taldeer, 2531121 )	--I come to destroy you mon-keigh.
    	CTRL.WAIT()
    	
    	CTRL.Actor_PlaySpeech(  ACT.Eliphas, 2531122 )	--Then why do I hear fear in your ancient voice?
    	CTRL.WAIT()
    	
    	Util_SetIE( false )
    
    end
    Adapting these to work on a given map should be relatively easy. Developing them to work generically and still make sense would take more effort, but still be quite doable. I'm not much one for putting intel events into my scar (nor for trying to make computers "talk"), so setting up a really ambitious dialog tree would be outside of my personal interests. But there shouldn't be any insuperable barrier to you putting this together.

  7. #7
    Member Ness's Avatar
    Join Date
    Mar 2012
    Location
    In my ass
    K, I'm new here, I didn't read the forum rules, sorry about that. I'm sorry if I'm bad at expressing myself, I'm not born in any country in which english is native language, blah blah blah... Unfortunatelly, I'm not modder and I know nothing about modding, so the only thing I can do with Chiu ChunLing's reply is to look at it. The only thing I understood here is that I have to place this codes in some map file. How to do that, I have no idea. Is there any program for that kind of work ?

  8. #8
    Member Jaguar-Lord's Avatar
    Join Date
    Feb 2007
    Location
    france
    the dialog you want to do is mostly controlled through map scar calls of map nis.
    .nis file is not mandatory, you can play directly actors in map scar and skip the .nis file if you are aiming for a simple code.



    + take a look at the UCS lines number for any dialogue already existing in dow, i mean dialogs associated with audio files so you can hear them via your speaker.
    + regroup all these numbers in races associated tables or library
    + write your new win condition scar so that it detect the races present on a map and play randomly an actor of the given race at regular time interval.

  9. #9
    Member Ness's Avatar
    Join Date
    Mar 2012
    Location
    In my ass
    Thanks Jaguar-Lord, but I know that I'll be making mistakes and won't realize the problem, so basically I can't do this by myself. I don't have any experience in this things, either modding or programming, I'm level 0 LOL. Just try to think of it as a new mod, I know you guys can do it much faster and better than me. Probably you are busy creating mods of your own, but this takes much less time to be done. Choise is yours. Also I assume that DARKNESS WITHIN will be a great mod.

    EDIT: Where to find this .SCAR and .NIS files? Whenever I download some map for either DC or SS, it usually consists of 4 files:
    3x TGA files and 1x SGB file. That's the problem. It's going to take me a lot of time to make this mod, and while you're explaining me how to do it, you could've made it already.
    Last edited by Ness; 11th Mar 12 at 11:34 AM.

  10. #10
    Member
    Join Date
    Mar 2010
    Location
    West Midlands, UK
    Skirmish/multiplayer maps don't usually have .nis and .scar files, so you'll have to create your own. They should then be stored in the same location as the .tga and .sgb files for the mission (Data/Scenarios/MP).

  11. #11
    Member Jaguar-Lord's Avatar
    Join Date
    Feb 2007
    Location
    france
    @Ness : lol ! some years ago i was a level 0 modder, a newcommer to the modding world, as everyone else here. for you own sake: either you are ready to spend some time and learn how to make a dialog mod like you want it, and the community is going to support and learn you how to do it, or you wont get anything because 1) doing such a mod requires more than a few mouse clicks, and second because this is not the Way of the Modder..... the way of the modder is :
    STUDY
    TRY
    TRY AGAIN
    TRY HARDER
    DO
    FAIL
    ...refrain yourself from insulting the arrogant old farts in the dow modding community....
    DO AGAIN
    CRY
    REDO
    SUCCEED !!
    SHARE
    ....become an old arrogant fart yourself !!





    edit : the above is the traditional Way Of the Modder, there's a darker way, the way of the Traitor and Treacherous ONe, but to speak of it here's is to call Exterminatus upon oneself !!

  12. #12
    Member Ness's Avatar
    Join Date
    Mar 2012
    Location
    In my ass
    LMAO
    This mod is the only reason I registered here, honestly. Modding is not for me, I have other plans, and even if I succeed
    in making it, I'll be leaving forums right after that. Sorry, but don't expect me to join community or some shit. (No offense, of course) Well, I would like to help by publishing mod or giving you credit for it(if that matters to you), so if you want to LEARN me something, then that would be ONLY about this mod. BUT, Improved knowledge about modding in general - not an option.

    Anyway, I've downloaded SCAR, which means I can now open .scar files. I've been reading about adding the qoutes from campaign.Still, I have no idea how to make/open .NIS file. So, what's my next step?

  13. #13
    I've often considered this - creating a scripted metamap, which generates a simple missions randomly, as let's be honest, the motivations for most WH40K campaigns are similar enough. I guess the trick would be to work out exactly what conditions would generate the dialogue.

    @Ness, you will need to learn how to SCAR code, using the SCARDOC which has all the functions for the scripting language, SCAR. It's a straight forward enough language which can easily be created and manipulated in notepad. Chiu Chinling has included the functions you will need above, you would need to create a scar file that calls the commands upon launch. DoW seems to check if there are any .scar files with the same file name as the map you are running on load - there are loads of examples from custom maps (check my sig for a badass scar map) to win conditions and survival modes.

    I will state right out that unless you want it really simple and have dialogue at the start and not at all else, then this will require a significant time investment. If you knew SCAR then it would take a day or two of full work, but personally I would take longer to test that it all works. You will have to improve your modding knowledge in SCAR coding to do this as otherwise you will not be able to debug the thing.

  14. #14
    Member jONES1979's Avatar
    Join Date
    Dec 2008
    Location
    Нижний Тагил
    Quote Originally Posted by Ness View Post
    LMAO
    Anyway, I've downloaded SCAR, which means I can now open .scar files. I've been reading about adding the qoutes from campaign.Still, I have no idea how to make/open .NIS file. So, what's my next step?

    The Steel Legion for SS mod
    already contain such a map (which you can take as example). This map is the extracted from SS-metamap campaign "vs-Okrs Stronghold" mission and fully adopted to run via skirmish game. It contain respective SCAR(objectives, rules, etc) and NIS (dialog) files.

    The similar map (vs-Eldar Stronghold) was contained in the Black Templars Kaurava Crusade mod long ago, but this map absent in the Beta-4, unfortunately. ( It handled Player's selected race and plays appropriate dialogs for them. All vanilla races supported (except Orks obviously) and few modder's races as well (Steel Legions, Black Templars and IDH for SS Beta2))


    UPD: This Eldar Stronghold map (the latest version) is in the The Steel Legion for SS mod thread too, just look at bottom of first post.
    Last edited by jONES1979; 12th Mar 12 at 10:25 AM.

  15. #15
    Member Ness's Avatar
    Join Date
    Mar 2012
    Location
    In my ass
    Understood. Thank you fuggles and jONES1979, now I see that this won't be easy at all. I'll check The Steel Legion mod. In case it proves to be good for me, this ''dialog mod thing'' is coming to it's end. If not.. well, I'll try to make 1 myself, even if I know it's going to be nothing else then rubbish.

  16. #16
    Some other useful scar commands (for controlling when dialog might occur, other than the opening speeches) would be Player_GetEntities() and Player_GetSquads(), which return EGroup/SGroups that you can use for functions like Player_CanSeeEGroup/SGroup() or EGroup/SGroup_IsUnderAttackByPlayer(). All of the Stats_ functions are good for helping you quickly estimate current army strength so that the various taunts are somewhat appropriate to the situation in the game. Stats_ActiveArmyCost() is particularly good for this, Stats_PlayerStructuresLost/Razed() and Stats_PlayerUnitsLost/Killed() are helpful in estimating the progress of the battle.

    There's a function for Cpu_SetLippy(). It's supposed to make the A.I. talk smack, but I don't know what that actually amounts to.

  17. #17
    Member Ness's Avatar
    Join Date
    Mar 2012
    Location
    In my ass
    Okay. But can you at least create a simple .scar script along with this .nis file (function call) and choose any 2-player map, and using these create a mod but only for Tau and Space Marines (for example)? It would help me alot, because when I see your work, I will be able to do the rest of the work myself(Adding more dialogs for other races - actually improving it). All I need is a FULL EXAMPLE , no explanation required. And also, if you are going to make that example, just link it so I can download and do some changes.

  18. #18
    Well, the mission.scar and .nis files are already pretty good examples of how to do this sort of thing, better than anything I could throw together without a real notion of how the dialog is supposed to flow.

    Basically, if you look at an .nis file there are just some unconnected "EVENTS" functions. Intel events (which just play some voice acting files and their text strings) are quite simple, and they are generally commented in the mission.nis files so you can see what is being said. To find out the conditions that trigger an Intel event, you need to search for where the function is called in the mission.scar and see the logic of why that happened.

    Probably there are two main types of ways to call events (for our purposes). Rule_AddOneShot() and Rule_AddInterval(). We'll call the opening dialogs a specified time after the game start. Then you call other dialogs when a periodic check reveals that the conditions for those dialogs have been met. Once a Rule added by Rule_AddInterval() plays it's dialog, you can use Rule_Remove() so that the Rule stops being called and the dialog doesn't repeat. You can also have the finished Rule call another Rule using Rule_AddInterval, for if a given bit of dialog should only happen after another. Or multiple Rules can be checking whether the game conditions justify the dialog they have to play.

    A simple .scar to control a small amount of dialog might look something like this:

    Code:
    function OnInit()  --starting point of the scar, kicks off our other functions
    Rule_AddOneShot(Rule_Opening_Taunts,10)
    end
    Scar_AddInit(OnInit) --tells the game that this is the starting point
    
    function Rule_Opening_Taunts() --this is run 10 seconds into the game, it establishes whether or not we have a human player against a computer, one being tau and the other being marines
    local humanplayer = nil
    local Cpu_player = nil
    local pcount = World_GetPlayerCount() 
    if pcount == 2 then for i = 1, pcount do --go through and assign values to 
    local player = World_GetPlayerAt(i-1) 
    if Cpu_IsCpuPlayer(player) then Cpu_player = player else humanplayer = player end
    end end
    if humanplayer and Cpu_player then -- if there were two players, a human and a CPU, both these will have PlayerID values and no longer be nil, so we can
    if (Player_GetRaceName(humanplayer) == "space_marine_race" and Player_GetRaceName(Cpu_player) == "tau_race") --check if one is Marines and 
    or (Player_GetRaceName(humanplayer) == "tau_race" and Player_GetRaceName(Cpu_player) == "space_marine_race") then --the other is Tau
    t_playerID[1] = humanplayer; t_playerID[2] = Cpu_player --put our local values into a table so they can be accessed later
    Util_StartIntel(EVENTS.IE_Tau_V_Marines) --play an intel event from the .nis (you'll need to write this, it's like the "EVENTS.IE_Eldar_Bastion" example)
    Rule_AddInterval(Rule_Exciting_Conclusion, 10) --call the rule that checks for imminent victory and calls the final dialog
    end end
    end
    
    function Rule_Exciting_Conclusion()
    for i = 1, table.getn(t_playerID) do
    if Player_GetBuildingsCount(t_playerID[i]) < 2 and Stats_PlayerStructuresLost(Player_GetID(t_playerID[i])) > 10 then --player "i" is probably gonna lose, so
    if Player_GetRaceName(t_playerID[i]) == "space_marine_race" then Util_StartIntel(EVENTS.IE_The_Tau_Win) else Util_StartIntel(EVENTS.IE_The_Marines_Win) end
    end end
    end
    Okay, this is just an illustration of the concept, made super simple and not even tested because I just wrote it as an example, there are no nis intel events written for this either. But if you go through and look at the various functions used, you should be able to understand basically how this script works (or is intended to work). The basic idea is to only run the dialog at the beginning (and call the closing rule at an interval) if we have two players, one of whom is a human and the other of whom is a computer, one playing space marines and the other playing tau. If this is the case, we get an opening intel event and begin checking for a fairly hopeless situation on the part of either player, and then call one of two intel events (named appropriately) depending on the race of the player that is about to lose. As mentioned, we could have arranged these in various other contingencies. There could be a longer chain of events that would have to be fulfilled in order (Hah, I've got a barracks and a bunch of guys that are gonna kill you!, now I've got vehicles!, now I'm crushing you with tier 4 ubers!) or we could set them up with their rules running at the same time (we can invoke multiple rules running at intervals), and any combination.

    I imagine that your dialog tree will get pretty complex once you factor in all the different races and how they might interact in an otherwise unscripted battle. But hopefully you can get the basic idea of how to control it with this.

  19. #19
    Failing that then the tutorial scar is excellent as it has lots of dialogue triggered by different events

  20. #20
    Member Ness's Avatar
    Join Date
    Mar 2012
    Location
    In my ass
    Well, thanks again. ''Hopefully'' I'll manage to do something. I'm still a little bit confused, I have lots of responsibilities, anyways I'll be informing you of my progress. Also, If you decide to make something, just post here and I'll take a look.

  21. #21
    This fellow no longer seems to be about....that might be a shame for him.

  22. #22
    Perhaps not quite what he asked for before leaving the forums, but I have added a dialogue option to my win conditions mod:

    http://forums.relicnews.com/showthre...-campaign-1-11

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •