modsvaskr 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/modsvaskr/game.rb +24 -0
- data/lib/modsvaskr/games/skyrim_se.rb +15 -1
- data/lib/modsvaskr/tests_suites/npc.rb +13 -3
- data/lib/modsvaskr/tests_suites/npc_head.rb +13 -3
- data/lib/modsvaskr/ui.rb +0 -1
- data/lib/modsvaskr/version.rb +1 -1
- data/lib/modsvaskr/xedit.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d247b6d5b73f10426d5769b031213c408bc6ac8c390baea5e9f6a1b0af7495d
|
4
|
+
data.tar.gz: 97d98a1e6d93088e7a63f9a07ac31b01c3ed8e0aba4e4159a842fff9af8efaae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d17a2422af5a5428266c5586887ab5210e0ad7026c8c07fced929b2731aafb07c97bad7c4c8be5886cac8d19ae7e51e1f3f386da6d00d64536e0032bde004e76
|
7
|
+
data.tar.gz: 775b864997420ad4e78af51e4511d0ad579a236781cbc30c1f1c577992ae3f486d3ab40f701acf4937d51b2bf4397d02fb54c409d37965a03596e0acc57ad799
|
data/lib/modsvaskr/game.rb
CHANGED
@@ -174,6 +174,30 @@ module Modsvaskr
|
|
174
174
|
end
|
175
175
|
end
|
176
176
|
|
177
|
+
# Get the load order.
|
178
|
+
# Keep a cache of it.
|
179
|
+
#
|
180
|
+
# Result::
|
181
|
+
# * Array<String>: List of all active plugins, including masters
|
182
|
+
def get_load_order
|
183
|
+
@cache_load_order = load_order unless defined?(@cache_load_order)
|
184
|
+
@cache_load_order
|
185
|
+
end
|
186
|
+
|
187
|
+
# Get the mod and base id corresponding to a given form id.
|
188
|
+
# Uses load order to determine it.
|
189
|
+
#
|
190
|
+
# Parameters::
|
191
|
+
# * *form_id* (String or Integer): Form ID, either as hexadecimal string, or numercial value
|
192
|
+
# Result::
|
193
|
+
# * String: Plugin name
|
194
|
+
# * Integer: Base form id, independent from the load order
|
195
|
+
def decode_form_id(form_id)
|
196
|
+
form_id = form_id.to_i(16) if form_id.is_a?(String)
|
197
|
+
[get_load_order[form_id / 16_777_216], form_id % 16_777_216]
|
198
|
+
end
|
199
|
+
|
200
|
+
|
177
201
|
end
|
178
202
|
|
179
203
|
end
|
@@ -37,7 +37,9 @@ module Modsvaskr
|
|
37
37
|
'SkyrimSE.exe'
|
38
38
|
end
|
39
39
|
|
40
|
-
#
|
40
|
+
# Ordered list of default esps present in the game (the ones in the Data folder when 0 mod is being used).
|
41
|
+
# The list is ordered according to the game's load order.
|
42
|
+
# [API] - This method is mandatory
|
41
43
|
#
|
42
44
|
# Result::
|
43
45
|
# * Array<String>: List of esp/esm/esl base file names.
|
@@ -51,6 +53,18 @@ module Modsvaskr
|
|
51
53
|
]
|
52
54
|
end
|
53
55
|
|
56
|
+
# Get the load order.
|
57
|
+
# [API] - This method is mandatory
|
58
|
+
#
|
59
|
+
# Result::
|
60
|
+
# * Array<String>: List of all active plugins, including masters
|
61
|
+
def load_order
|
62
|
+
game_esps +
|
63
|
+
File.read("#{ENV['USERPROFILE']}/AppData/Local/Skyrim Special Edition/plugins.txt").split("\n").map do |line|
|
64
|
+
line =~ /^\*(.+)$/ ? $1.downcase : nil
|
65
|
+
end.compact
|
66
|
+
end
|
67
|
+
|
54
68
|
private
|
55
69
|
|
56
70
|
# Install SKSE64 corresponding to our game
|
@@ -25,9 +25,19 @@ module Modsvaskr
|
|
25
25
|
tests = {}
|
26
26
|
@game.xedit.run_script('DumpInfo', only_once: true)
|
27
27
|
@game.xedit.parse_csv('Modsvaskr_ExportedDumpInfo') do |row|
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
if row[1].downcase == 'npc_'
|
29
|
+
# Know from which mod this ID comes from
|
30
|
+
plugin, base_form_id = @game.decode_form_id(row[2])
|
31
|
+
test_name = "#{plugin}/#{base_form_id}"
|
32
|
+
if tests.key?(test_name)
|
33
|
+
# Add the name of the mod to the description, so that we know which mod modifies which NPC.
|
34
|
+
tests[test_name][:name] << "/#{row[0].downcase}"
|
35
|
+
else
|
36
|
+
tests[test_name] = {
|
37
|
+
name: "Take screenshot of #{row[3]} - #{row[0].downcase}"
|
38
|
+
}
|
39
|
+
end
|
40
|
+
end
|
31
41
|
end
|
32
42
|
tests
|
33
43
|
end
|
@@ -25,9 +25,19 @@ module Modsvaskr
|
|
25
25
|
tests = {}
|
26
26
|
@game.xedit.run_script('DumpInfo', only_once: true)
|
27
27
|
@game.xedit.parse_csv('Modsvaskr_ExportedDumpInfo') do |row|
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
if row[1].downcase == 'npc_'
|
29
|
+
# Know from which mod this ID comes from
|
30
|
+
plugin, base_form_id = @game.decode_form_id(row[2])
|
31
|
+
test_name = "#{plugin}/#{base_form_id}"
|
32
|
+
if tests.key?(test_name)
|
33
|
+
# Add the name of the mod to the description, so that we know which mod modifies which NPC.
|
34
|
+
tests[test_name][:name] << "/#{row[0].downcase}"
|
35
|
+
else
|
36
|
+
tests[test_name] = {
|
37
|
+
name: "Take head screenshot of #{row[3]} - #{row[0].downcase}"
|
38
|
+
}
|
39
|
+
end
|
40
|
+
end
|
31
41
|
end
|
32
42
|
tests
|
33
43
|
end
|
data/lib/modsvaskr/ui.rb
CHANGED
data/lib/modsvaskr/version.rb
CHANGED
data/lib/modsvaskr/xedit.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modsvaskr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Muriel Salvan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses_menu
|