Skip to content

Commit 7b349cd

Browse files
authored
Attribute fix on itemgen (#293)
1 parent 7d013a0 commit 7b349cd

File tree

2 files changed

+20
-27
lines changed
  • src/main
    • java/studio/magemonkey/divinity/modules/list/itemgenerator/editor/stats
    • resources/modules/item_generator/items

2 files changed

+20
-27
lines changed

src/main/java/studio/magemonkey/divinity/modules/list/itemgenerator/editor/stats/StatListGUI.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,16 @@ public void setContents() {
3131
if (section != null) {
3232
list.addAll(section.getKeys(false));
3333
}
34+
35+
this.slots.clear();
36+
37+
// Get from and to based on the page. I always can have 45 entries per page
38+
int from = this.getPage() * 45;
39+
int to = Math.min(from + 45, list.size());
40+
3441
int i = 0;
35-
for (String entry : list) {
42+
for(int j = from; j < to; j++) {
43+
String entry = list.get(j);
3644
i++;
3745
if (i % this.inventory.getSize() == 53) {
3846
this.setSlot(i, getNextButton());

src/main/resources/modules/item_generator/items/common.yml

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -275,31 +275,16 @@ generator:
275275
- '%FABLED_ATTRIBUTE_DEXTERITY%'
276276
- '%FABLED_ATTRIBUTE_STRENGTH%'
277277
list:
278-
vitality:
279-
chance: 20.0
280-
scale-by-level: 1.025
281-
min: 3.0
282-
max: 6.25
283-
spirit:
284-
chance: 20.0
285-
scale-by-level: 1.025
286-
min: 1.1
287-
max: 1.25
288-
intelligence:
289-
chance: 10.0
290-
scale-by-level: 1.025
291-
min: 2.5
292-
max: 4.0
293-
dexterity:
294-
chance: 10.0
295-
scale-by-level: 1.025
296-
min: 4.5
297-
max: 7.5
298-
strength:
299-
chance: 10.0
300-
scale-by-level: 1.025
301-
min: 1.5
302-
max: 7.0
278+
#vitality:
279+
# chance: 20.0
280+
# scale-by-level: 1.025
281+
# min: 3.0
282+
# max: 6.25
283+
#spirit:
284+
# chance: 20.0
285+
# scale-by-level: 1.025
286+
# min: 1.1
287+
# max: 1.25
303288
sockets:
304289
GEM:
305290
minimum: 0
@@ -341,4 +326,4 @@ generator:
341326
max-level: 1
342327
lore-format:
343328
- '&bSample Ability: &7[&f%level%&7]'
344-
target-requirements: { }
329+
target-requirements: { }

0 commit comments

Comments
 (0)