Class: Modsvaskr::Games::SkyrimSe
- Inherits:
-
Modsvaskr::Game
- Object
- Modsvaskr::Game
- Modsvaskr::Games::SkyrimSe
- Defined in:
- lib/modsvaskr/games/skyrim_se.rb
Overview
Handle a Skyrim installation
Instance Method Summary collapse
-
#complete_game_menu(menu) ⇒ Object
Complete the game menu [API] - This method is optional.
-
#game_esps ⇒ Object
Ordered list of default esps present in the game (the ones in the Data folder when 0 mod is being used).
-
#init ⇒ Object
Initialize the game [API] - This method is optional.
-
#read_load_order ⇒ Object
Read the load order.
-
#running_exe ⇒ Object
Get the game running executable name (that can be found in a tasks manager) [API] - This method is mandatory.
Methods inherited from Modsvaskr::Game
#clean_plugins, #decode_form_id, #initialize, #kill, #launch, #launch_exe, #load_order, #name, #path, #running?, #tests_poll_secs, #timeout_frozen_tests_secs, #timeout_interrupt_tests_secs, #xedit
Methods included from Logger
#log, #out, #wait_for_user_enter
Methods included from RunCmd
Constructor Details
This class inherits a constructor from Modsvaskr::Game
Instance Method Details
#complete_game_menu(menu) ⇒ Object
Complete the game menu
- API
-
This method is optional
-
- Parameters
-
menu (CursesMenu): Menu to complete
23 24 25 26 27 28 29 |
# File 'lib/modsvaskr/games/skyrim_se.rb', line 23 def () .item 'Install SKSE64' do install_skse64 out 'Press Enter to continue...' wait_for_user_enter end end |
#game_esps ⇒ Object
Ordered list of default esps present in the game (the ones in the Data folder when 0 mod is being used). The list is ordered according to the game’s load order.
- API
-
This method is mandatory
-
- Result
-
Array<String>: List of esp/esm/esl base file names.
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/modsvaskr/games/skyrim_se.rb', line 46 def game_esps %w[ skyrim.esm update.esm dawnguard.esm hearthfires.esm dragonborn.esm ccbgssse001-fish.esm ccqdrsse001-survivalmode.esl ccbgssse037-curios.esl ccbgssse025-advdsgs.esm ] end |
#init ⇒ Object
Initialize the game
- API
-
This method is optional
-
14 15 16 |
# File 'lib/modsvaskr/games/skyrim_se.rb', line 14 def init @tmp_dir = "#{Dir.tmpdir}/modsvaskr" end |
#read_load_order ⇒ Object
Read the load order.
- API
-
This method is mandatory
-
- Result
-
Array<String>: List of all active plugins, including masters
65 66 67 68 69 70 |
# File 'lib/modsvaskr/games/skyrim_se.rb', line 65 def read_load_order game_esps + File.read("#{ENV.fetch('USERPROFILE')}/AppData/Local/Skyrim Special Edition/plugins.txt").split("\n").map do |line| line =~ /^\*(.+)$/ ? Regexp.last_match(1).downcase : nil end.compact end |
#running_exe ⇒ Object
Get the game running executable name (that can be found in a tasks manager)
- API
-
This method is mandatory
-
- Result
-
String: The running exe name
36 37 38 |
# File 'lib/modsvaskr/games/skyrim_se.rb', line 36 def running_exe 'SkyrimSE.exe' end |